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

ruby-changes:35337

From: nagachika <ko1@a...>
Date: Sat, 6 Sep 2014 00:58:19 +0900 (JST)
Subject: [ruby-changes:35337] nagachika:r47419 (ruby_2_1): merge revision(s) r47327: [Backport #10008]

nagachika	2014-09-06 00:58:09 +0900 (Sat, 06 Sep 2014)

  New Revision: 47419

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

  Log:
    merge revision(s) r47327: [Backport #10008]
    
    * 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_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/ext/zlib/zlib.c
    branches/ruby_2_1/test/zlib/test_zlib.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 47418)
+++ ruby_2_1/ChangeLog	(revision 47419)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Sat Sep  6 00:57:07 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
+
 Sat Sep  6 00:47:32 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in (rb_cv_broken_backtrace): exit with failure
Index: ruby_2_1/ext/zlib/zlib.c
===================================================================
--- ruby_2_1/ext/zlib/zlib.c	(revision 47418)
+++ ruby_2_1/ext/zlib/zlib.c	(revision 47419)
@@ -2288,6 +2288,7 @@ static void https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/zlib/zlib.c#L2288
 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_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 47418)
+++ ruby_2_1/version.h	(revision 47419)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.2"
 #define RUBY_RELEASE_DATE "2014-09-06"
-#define RUBY_PATCHLEVEL 225
+#define RUBY_PATCHLEVEL 226
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 9
Index: ruby_2_1/test/zlib/test_zlib.rb
===================================================================
--- ruby_2_1/test/zlib/test_zlib.rb	(revision 47418)
+++ ruby_2_1/test/zlib/test_zlib.rb	(revision 47419)
@@ -697,6 +697,11 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/zlib/test_zlib.rb#L697
           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_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r47327


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

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