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

ruby-changes:34597

From: naruse <ko1@a...>
Date: Fri, 4 Jul 2014 03:00:03 +0900 (JST)
Subject: [ruby-changes:34597] naruse:r46678 (trunk): change default not tot create useless object

naruse	2014-07-04 02:59:49 +0900 (Fri, 04 Jul 2014)

  New Revision: 46678

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

  Log:
    change default not tot create useless object
    
    initheader = initheader ? initheader.dup : {}

  Modified files:
    trunk/lib/net/http.rb
Index: lib/net/http.rb
===================================================================
--- lib/net/http.rb	(revision 46677)
+++ lib/net/http.rb	(revision 46678)
@@ -1123,7 +1123,7 @@ module Net   #:nodoc: https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L1123
     #       end
     #     }
     #
-    def get(path, initheader = {}, dest = nil, &block) # :yield: +body_segment+
+    def get(path, initheader = nil, dest = nil, &block) # :yield: +body_segment+
       res = nil
       request(Get.new(path, initheader)) {|r|
         r.read_body dest, &block

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

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