1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/openssl] test/openssl/test_ssl: use assert_raise in test_bad_socket

The Ruby tree disallows assert_raises.

https://github.com/ruby/openssl/commit/9b4f761e74
This commit is contained in:
Kazuki Yamaguchi 2021-10-23 13:35:04 +09:00
parent 35b9d8d393
commit cda8bc3657

View file

@ -6,7 +6,7 @@ if defined?(OpenSSL)
class OpenSSL::TestSSL < OpenSSL::SSLTestCase
def test_bad_socket
bad_socket = Struct.new(:sync).new
assert_raises TypeError do
assert_raise TypeError do
socket = OpenSSL::SSL::SSLSocket.new bad_socket
# if the socket is not a T_FILE, `connect` will segv because it tries
# to get the underlying file descriptor but the API it calls assumes