ruby-changes:18015
From: yugui <ko1@a...>
Date: Thu, 2 Dec 2010 17:06:53 +0900 (JST)
Subject: [ruby-changes:18015] Ruby:r30036 (ruby_1_9_2): merges r29442 from trunk into ruby_1_9_2.
yugui 2010-12-02 17:06:35 +0900 (Thu, 02 Dec 2010) New Revision: 30036 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30036 Log: merges r29442 from trunk into ruby_1_9_2. -- * lib/net/http.rb (HTTP.get): specify ASCII-8BIT as the result encoding of Zlib::GzipReader. http://hibari.2ch.net/test/read.cgi/tech/1281473294/271 Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/lib/net/http.rb branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 30035) +++ ruby_1_9_2/ChangeLog (revision 30036) @@ -1,3 +1,9 @@ +Mon Oct 11 20:20:23 2010 NARUSE, Yui <naruse@r...> + + * lib/net/http.rb (HTTP.get): specify ASCII-8BIT as the result + encoding of Zlib::GzipReader. + http://hibari.2ch.net/test/read.cgi/tech/1281473294/271 + Mon Oct 11 14:03:54 2010 NARUSE, Yui <naruse@r...> * error.c (syserr_initialize): set the encoding of Errno::*#message Index: ruby_1_9_2/lib/net/http.rb =================================================================== --- ruby_1_9_2/lib/net/http.rb (revision 30035) +++ ruby_1_9_2/lib/net/http.rb (revision 30036) @@ -883,7 +883,7 @@ the_body = r.read_body dest, &block case r["content-encoding"] when "gzip" - r.body= Zlib::GzipReader.new(StringIO.new(the_body)).read + r.body= Zlib::GzipReader.new(StringIO.new(the_body), encoding: "ASCII-8BIT").read r.delete("content-encoding") when "deflate" r.body= Zlib::Inflate.inflate(the_body); Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 30035) +++ ruby_1_9_2/version.h (revision 30036) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 66 +#define RUBY_PATCHLEVEL 67 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/