Project

General

Profile

Bug #9028 ยป openssl.buffering.rb.encoding.patch

drbrain (Eric Hodel), 12/03/2013 07:14 AM

View differences:

ext/openssl/lib/openssl/buffering.rb (working copy)
#
# coding: binary
#--
#= $RCSfile$ -- Buffering mix-in module.
#
test/openssl/test_ssl.rb (working copy)
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|
    (1-1/1)