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

ruby-changes:31971

From: hsbt <ko1@a...>
Date: Sat, 7 Dec 2013 19:33:21 +0900 (JST)
Subject: [ruby-changes:31971] hsbt:r44050 (trunk): * lib/net/http/header.rb: [DOC] Net::HTTP#to_hash returns pair of key and array values. Thanks @bjhaid [fix GH-467]

hsbt	2013-12-07 19:33:16 +0900 (Sat, 07 Dec 2013)

  New Revision: 44050

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

  Log:
    * lib/net/http/header.rb: [DOC] Net::HTTP#to_hash returns pair of key and array values. Thanks @bjhaid [fix GH-467]

  Modified files:
    trunk/lib/net/http/header.rb
Index: lib/net/http/header.rb
===================================================================
--- lib/net/http/header.rb	(revision 44049)
+++ lib/net/http/header.rb	(revision 44050)
@@ -145,11 +145,11 @@ module Net::HTTPHeader https://github.com/ruby/ruby/blob/trunk/lib/net/http/header.rb#L145
     @header.key?(key.downcase)
   end
 
-  # Returns a Hash consisting of header names and values.
+  # Returns a Hash consisting of header names and array of values.
   # e.g.
-  # {"cache-control" => "private",
-  #  "content-type" => "text/html",
-  #  "date" => "Wed, 22 Jun 2005 22:11:50 GMT"}
+  # {"cache-control" => ["private"],
+  #  "content-type" => ["text/html"],
+  #  "date" => ["Wed, 22 Jun 2005 22:11:50 GMT"]}
   def to_hash
     @header.dup
   end

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

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