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

ruby-changes:50334

From: nobu <ko1@a...>
Date: Sat, 17 Feb 2018 16:54:58 +0900 (JST)
Subject: [ruby-changes:50334] nobu:r62449 (trunk): socket.rb: protected connect_internal

nobu	2018-02-17 16:54:52 +0900 (Sat, 17 Feb 2018)

  New Revision: 62449

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

  Log:
    socket.rb: protected connect_internal
    
    * ext/socket/lib/socket.rb (Addrinfo#connect_internal): make
      protected for Addrinfo#connect_to, instead of private and send.

  Modified files:
    trunk/ext/socket/lib/socket.rb
Index: ext/socket/lib/socket.rb
===================================================================
--- ext/socket/lib/socket.rb	(revision 62448)
+++ ext/socket/lib/socket.rb	(revision 62449)
@@ -77,7 +77,7 @@ class Addrinfo https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L77
       sock
     end
   end
-  private :connect_internal
+  protected :connect_internal
 
   # :call-seq:
   #   addrinfo.connect_from([local_addr_args], [opts]) {|socket| ... }
@@ -158,7 +158,7 @@ class Addrinfo https://github.com/ruby/ruby/blob/trunk/ext/socket/lib/socket.rb#L158
   #
   def connect_to(*args, timeout: nil, &block)
     remote_addrinfo = family_addrinfo(*args)
-    remote_addrinfo.send(:connect_internal, self, timeout, &block)
+    remote_addrinfo.connect_internal(self, timeout, &block)
   end
 
   # creates a socket bound to self.

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

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