[前][次][番号順一覧][スレッド一覧]

ruby-changes:31885

From: drbrain <ko1@a...>
Date: Tue, 3 Dec 2013 10:44:48 +0900 (JST)
Subject: [ruby-changes:31885] drbrain:r43964 (trunk): * ext/openssl/lib/openssl/buffering.rb: Return ASCII-8BIT strings from

drbrain	2013-12-03 10:44:41 +0900 (Tue, 03 Dec 2013)

  New Revision: 43964

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43964

  Log:
    * ext/openssl/lib/openssl/buffering.rb:  Return ASCII-8BIT strings from
      SSLSocket methods.  [ruby-trunk - Bug #9028]
    * test/openssl/test_ssl.rb:  Test for the above.

  Modified files:
    trunk/ChangeLog
    trunk/ext/openssl/lib/openssl/buffering.rb
    trunk/test/openssl/test_ssl.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43963)
+++ ChangeLog	(revision 43964)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Dec  3 10:43:58 2013  Eric Hodel  <drbrain@s...>
+
+	* ext/openssl/lib/openssl/buffering.rb:  Return ASCII-8BIT strings from
+	  SSLSocket methods.  [ruby-trunk - Bug #9028]
+	* test/openssl/test_ssl.rb:  Test for the above.
+
 Tue Dec  3 09:42:27 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rdoc:  Update to RDoc master 900de99.  Changes include:
Index: ext/openssl/lib/openssl/buffering.rb
===================================================================
--- ext/openssl/lib/openssl/buffering.rb	(revision 43963)
+++ ext/openssl/lib/openssl/buffering.rb	(revision 43964)
@@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ext/openssl/lib/openssl/buffering.rb#L1
-#
+# coding: binary
 #--
 #= $RCSfile$ -- Buffering mix-in module.
 #
Index: test/openssl/test_ssl.rb
===================================================================
--- test/openssl/test_ssl.rb	(revision 43963)
+++ test/openssl/test_ssl.rb	(revision 43964)
@@ -30,6 +30,20 @@ class OpenSSL::TestSSL < OpenSSL::SSLTes https://github.com/ruby/ruby/blob/trunk/test/openssl/test_ssl.rb#L30
     end
   end
 
+  def test_ssl_gets
+    start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true) { |server, port|
+      server_connect(port) { |ssl|
+        ssl.write "abc\n"
+        IO.select [ssl]
+
+        line = ssl.gets
+
+        assert_equal "abc\n", line
+        assert_equal Encoding::BINARY, line.encoding
+      }
+    }
+  end
+
   def test_ssl_read_nonblock
     start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true) { |server, port|
       server_connect(port) { |ssl|

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]