[前][次][番号順一覧][スレッド一覧]

ruby-changes:49161

From: rhe <ko1@a...>
Date: Fri, 15 Dec 2017 17:19:35 +0900 (JST)
Subject: [ruby-changes:49161] rhe:r61277 (trunk): openssl: suppress report_on_exception warning

rhe	2017-12-15 17:19:32 +0900 (Fri, 15 Dec 2017)

  New Revision: 61277

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61277

  Log:
    openssl: suppress report_on_exception warning
    
    Import a commit from upstream:
    
    33a67ac96492 test/utils: disable Thread's report_on_exception in start_server

  Modified files:
    trunk/test/openssl/utils.rb
Index: test/openssl/utils.rb
===================================================================
--- test/openssl/utils.rb	(revision 61276)
+++ test/openssl/utils.rb	(revision 61277)
@@ -214,6 +214,10 @@ class OpenSSL::SSLTestCase < OpenSSL::Te https://github.com/ruby/ruby/blob/trunk/test/openssl/utils.rb#L214
       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::Te https://github.com/ruby/ruby/blob/trunk/test/openssl/utils.rb#L231
               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::Te https://github.com/ruby/ruby/blob/trunk/test/openssl/utils.rb#L250
         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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]