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

ruby-changes:39415

From: tenderlove <ko1@a...>
Date: Thu, 6 Aug 2015 07:59:08 +0900 (JST)
Subject: [ruby-changes:39415] tenderlove:r51496 (trunk): * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move nonblock

tenderlove	2015-08-06 07:59:00 +0900 (Thu, 06 Aug 2015)

  New Revision: 51496

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

  Log:
    * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move nonblock
      enable to SSLSocket#initialize and remove Nonblock module.

  Modified files:
    trunk/ChangeLog
    trunk/ext/openssl/lib/openssl/ssl.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51495)
+++ ChangeLog	(revision 51496)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Aug  6 07:57:21 2015  Aaron Patterson <tenderlove@r...>
+
+	* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move nonblock
+	  enable to SSLSocket#initialize and remove Nonblock module.
+
 Thu Aug  6 07:53:47 2015  Aaron Patterson <tenderlove@r...>
 
 	* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move
Index: ext/openssl/lib/openssl/ssl.rb
===================================================================
--- ext/openssl/lib/openssl/ssl.rb	(revision 51495)
+++ ext/openssl/lib/openssl/ssl.rb	(revision 51496)
@@ -166,13 +166,6 @@ module OpenSSL https://github.com/ruby/ruby/blob/trunk/ext/openssl/lib/openssl/ssl.rb#L166
       end
     end
 
-    module Nonblock
-      def initialize(*args)
-        @io.nonblock = true if @io.respond_to?(:nonblock=)
-        super
-      end
-    end
-
     def verify_certificate_identity(cert, hostname)
       should_verify_common_name = true
       cert.extensions.each{|ext|
@@ -260,7 +253,6 @@ module OpenSSL https://github.com/ruby/ruby/blob/trunk/ext/openssl/lib/openssl/ssl.rb#L253
     class SSLSocket
       include Buffering
       include SocketForwarder
-      include Nonblock
 
       if ExtConfig::OPENSSL_NO_SOCK
         def initialize(io, ctx = nil); raise NotImplmentedError; end
@@ -293,6 +285,7 @@ module OpenSSL https://github.com/ruby/ruby/blob/trunk/ext/openssl/lib/openssl/ssl.rb#L285
           @context    = context
           @sync_close = false
           @hostname   = nil
+          @io.nonblock = true if @io.respond_to?(:nonblock=)
           context.setup
           super()
         end

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

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