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

ruby-changes:44707

From: nobu <ko1@a...>
Date: Mon, 14 Nov 2016 16:59:53 +0900 (JST)
Subject: [ruby-changes:44707] nobu:r56780 (trunk): net/ftp.rb: kwargs

nobu	2016-11-14 16:59:50 +0900 (Mon, 14 Nov 2016)

  New Revision: 56780

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

  Log:
    net/ftp.rb: kwargs
    
    * lib/net/ftp.rb (Net::FTP#open_socket): use keyword argument.

  Modified files:
    trunk/lib/net/ftp.rb
Index: lib/net/ftp.rb
===================================================================
--- lib/net/ftp.rb	(revision 56779)
+++ lib/net/ftp.rb	(revision 56780)
@@ -242,9 +242,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L242
         else
           sock = TCPSocket.open(host, port)
         end
-        io = BufferedSocket.new(sock)
-        io.read_timeout = @read_timeout
-        io
+        BufferedSocket.new(sock, read_timeout: @read_timeout)
       }
     end
     private :open_socket

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

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