Skip to content

Commit e45f56d

Browse files
committed
* ext/openssl/lib/openssl/buffering.rb: Return ASCII-8BIT strings from
SSLSocket methods. [ruby-trunk - Bug ruby#9028] * test/openssl/test_ssl.rb: Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 2c052a0 commit e45f56d

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Tue Dec 3 10:43:58 2013 Eric Hodel <drbrain@segment7.net>
2+
3+
* ext/openssl/lib/openssl/buffering.rb: Return ASCII-8BIT strings from
4+
SSLSocket methods. [ruby-trunk - Bug #9028]
5+
* test/openssl/test_ssl.rb: Test for the above.
6+
17
Tue Dec 3 09:42:27 2013 Eric Hodel <drbrain@segment7.net>
28

39
* lib/rdoc: Update to RDoc master 900de99. Changes include:

ext/openssl/lib/openssl/buffering.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
# coding: binary
22
#--
33
#= $RCSfile$ -- Buffering mix-in module.
44
#

test/openssl/test_ssl.rb

+14
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ def test_not_started_session
3030
end
3131
end
3232

33+
def test_ssl_gets
34+
start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true) { |server, port|
35+
server_connect(port) { |ssl|
36+
ssl.write "abc\n"
37+
IO.select [ssl]
38+
39+
line = ssl.gets
40+
41+
assert_equal "abc\n", line
42+
assert_equal Encoding::BINARY, line.encoding
43+
}
44+
}
45+
end
46+
3347
def test_ssl_read_nonblock
3448
start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true) { |server, port|
3549
server_connect(port) { |ssl|

0 commit comments

Comments
 (0)