ruby-changes:35418
From: usa <ko1@a...>
Date: Wed, 10 Sep 2014 12:24:44 +0900 (JST)
Subject: [ruby-changes:35418] usa:r47500 (ruby_2_0_0): merge revision(s) 47327: [Backport #10101]
usa 2014-09-10 12:24:33 +0900 (Wed, 10 Sep 2014) New Revision: 47500 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47500 Log: merge revision(s) 47327: [Backport #10101] * ext/zlib/zlib.c (gzfile_reset): preserve ZSTREAM_FLAG_GZFILE [Bug #10101] * test/zlib/test_zlib.rb (test_rewind): test each_byte Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/ext/zlib/zlib.c branches/ruby_2_0_0/test/zlib/test_zlib.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 47499) +++ ruby_2_0_0/ChangeLog (revision 47500) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Wed Sep 10 12:21:51 2014 Eric Wong <e@8...> + + * ext/zlib/zlib.c (gzfile_reset): preserve ZSTREAM_FLAG_GZFILE + [Bug #10101] + + * test/zlib/test_zlib.rb (test_rewind): test each_byte + Wed Sep 10 12:06:27 2014 Nobuyoshi Nakada <nobu@r...> * io.c (rb_io_initialize): [DOC] fix rdoc of append mode. it does Index: ruby_2_0_0/ext/zlib/zlib.c =================================================================== --- ruby_2_0_0/ext/zlib/zlib.c (revision 47499) +++ ruby_2_0_0/ext/zlib/zlib.c (revision 47500) @@ -2286,6 +2286,7 @@ static void https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/zlib/zlib.c#L2286 gzfile_reset(struct gzfile *gz) { zstream_reset(&gz->z); + gz->z.flags |= ZSTREAM_FLAG_GZFILE; gz->crc = crc32(0, Z_NULL, 0); gz->lineno = 0; gz->ungetc = 0; Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 47499) +++ ruby_2_0_0/version.h (revision 47500) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2014-09-10" -#define RUBY_PATCHLEVEL 561 +#define RUBY_PATCHLEVEL 562 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 9 Index: ruby_2_0_0/test/zlib/test_zlib.rb =================================================================== --- ruby_2_0_0/test/zlib/test_zlib.rb (revision 47499) +++ ruby_2_0_0/test/zlib/test_zlib.rb (revision 47500) @@ -701,6 +701,11 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L701 assert_equal("foo", f.read) f.rewind assert_equal("foo", f.read) + + f.rewind + bytes = [] + f.each_byte { |b| bytes << b } + assert_equal "foo".bytes.to_a, bytes, '[Bug #10101]' end open(t.path, "rb") do |f| gz = Zlib::GzipReader.new(f) Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r47327 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/