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:
parent
35b9d8d393
commit
cda8bc3657
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ if defined?(OpenSSL)
|
||||||
class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
||||||
def test_bad_socket
|
def test_bad_socket
|
||||||
bad_socket = Struct.new(:sync).new
|
bad_socket = Struct.new(:sync).new
|
||||||
assert_raises TypeError do
|
assert_raise TypeError do
|
||||||
socket = OpenSSL::SSL::SSLSocket.new bad_socket
|
socket = OpenSSL::SSL::SSLSocket.new bad_socket
|
||||||
# if the socket is not a T_FILE, `connect` will segv because it tries
|
# 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
|
# to get the underlying file descriptor but the API it calls assumes
|
||||||
|
|
Loading…
Add table
Reference in a new issue