diff options
author | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-15 08:19:32 +0000 |
---|---|---|
committer | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-15 08:19:32 +0000 |
commit | 42c4ca634de202e9a4c7d9ab021b425631cf54df (patch) | |
tree | c387071879327e403fe23ce0baf3522939171d0f /test/openssl | |
parent | a32e3fee79dcf6a13d90416bca1fca82fcf537c0 (diff) | |
download | ruby-42c4ca634de202e9a4c7d9ab021b425631cf54df.tar.gz |
openssl: suppress report_on_exception warning
Import a commit from upstream:
33a67ac96492 test/utils: disable Thread's report_on_exception in start_server
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r-- | test/openssl/utils.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb index a359949061..6318246ddb 100644 --- a/test/openssl/utils.rb +++ b/test/openssl/utils.rb @@ -214,6 +214,10 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase threads = [] begin server_thread = Thread.new do + if Thread.method_defined?(:report_on_exception=) # Ruby >= 2.4 + Thread.current.report_on_exception = false + end + begin loop do begin @@ -227,6 +231,10 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase end th = Thread.new do + if Thread.method_defined?(:report_on_exception=) + Thread.current.report_on_exception = false + end + begin server_proc.call(ctx, ssl) ensure @@ -242,6 +250,10 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase end client_thread = Thread.new do + if Thread.method_defined?(:report_on_exception=) + Thread.current.report_on_exception = false + end + begin block.call(port) ensure |