aboutsummaryrefslogtreecommitdiffstats
path: root/test/openssl
diff options
context:
space:
mode:
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_ssl.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index dad9a43779..940bc135ed 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -155,6 +155,21 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
}
end
+ def test_sysread_nonblock_and_syswrite_nonblock_keywords
+ start_server(ignore_listener_error: true) do |port|
+ sock = TCPSocket.new("127.0.0.1", port)
+ ssl = OpenSSL::SSL::SSLSocket.new(sock)
+
+ assert_warn ("") do
+ ssl.send(:syswrite_nonblock, "1", exception: false)
+ ssl.send(:sysread_nonblock, 1, exception: false) rescue nil
+ ssl.send(:sysread_nonblock, 1, String.new, exception: false) rescue nil
+ end
+ ensure
+ sock&.close
+ end
+ end
+
def test_sync_close
start_server { |port|
begin