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

ruby-changes:18541

From: yugui <ko1@a...>
Date: Sun, 16 Jan 2011 21:40:20 +0900 (JST)
Subject: [ruby-changes:18541] Ruby:r30564 (ruby_1_9_2): merges r30452 from trunk into ruby_1_9_2.

yugui	2011-01-16 21:34:40 +0900 (Sun, 16 Jan 2011)

  New Revision: 30564

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

  Log:
    merges r30452 from trunk into ruby_1_9_2.
    --
    * lib/net/http.rb (Net::HTTP#get): A header hash given should not
      be modified.

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/lib/net/http.rb
    branches/ruby_1_9_2/test/net/http/test_http.rb
    branches/ruby_1_9_2/version.h

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 30563)
+++ ruby_1_9_2/ChangeLog	(revision 30564)
@@ -1,3 +1,8 @@
+Wed Jan  5 13:56:54 2011  Akinori MUSHA  <knu@i...>
+
+	* lib/net/http.rb (Net::HTTP#get): A header hash given should not
+	  be modified.
+
 Sun Jan  9 16:31:34 2011  Yuki Sonoda (Yugui)  <yugui@y...>
 
 	* lib/irb/locale.rb (IRB::Locale::LOCALE_NAME_RE): 
Index: ruby_1_9_2/lib/net/http.rb
===================================================================
--- ruby_1_9_2/lib/net/http.rb	(revision 30563)
+++ ruby_1_9_2/lib/net/http.rb	(revision 30564)
@@ -873,7 +873,9 @@
       res = nil
       if HAVE_ZLIB
         unless  initheader.keys.any?{|k| k.downcase == "accept-encoding"}
-          initheader["accept-encoding"] = "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
+          initheader = initheader.merge({
+            "accept-encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
+          })
           @compression = true
         end
       end
Index: ruby_1_9_2/version.h
===================================================================
--- ruby_1_9_2/version.h	(revision 30563)
+++ ruby_1_9_2/version.h	(revision 30564)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 144
+#define RUBY_PATCHLEVEL 145
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1
Index: ruby_1_9_2/test/net/http/test_http.rb
===================================================================
--- ruby_1_9_2/test/net/http/test_http.rb	(revision 30563)
+++ ruby_1_9_2/test/net/http/test_http.rb	(revision 30564)
@@ -45,6 +45,10 @@
     assert_equal $test_net_http_data, body
     assert_equal $test_net_http_data.size, res.body.size
     assert_equal $test_net_http_data, res.body
+
+    assert_nothing_raised {
+      res, body = http.get('/', { 'User-Agent' => 'test' }.freeze)
+    }
   end
 
   def _test_get__iter(http)

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

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