summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-10 18:37:45 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-10 18:37:45 +0000
commit6d0f11de6a6a7090e9a1825b7093f1bf2b4932f4 (patch)
tree1ca0b02f37d679860f71800998deba6238fa09c4
parent773b80bf36dec581cfbbb5a522529b7ec9afd82a (diff)
merge revision(s) 33946:
* ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937. 1st, to change the mode of an IO is very sensitive problem, so the maintainer of this library should judge it. 2nd, usually Zlib::GzReader.new is not called directly. #initialize is called via .open, and in the method the I/O is opened in binary mode, so there is no problem without changing the mode in #initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--ext/zlib/zlib.c8
-rw-r--r--version.h2
3 files changed, 10 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 132ef2c091..f8934be1d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sat Feb 11 03:37:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.
+ 1st, to change the mode of an IO is very sensitive problem, so
+ the maintainer of this library should judge it.
+ 2nd, usually Zlib::GzReader.new is not called directly. #initialize
+ is called via .open, and in the method the I/O is opened in binary
+ mode, so there is no problem without changing the mode in #initialize.
+
Sat Feb 11 03:23:58 2012 Luis Lavena <luislavena@gmail.com>
* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index be88118ae6..42c2c75f92 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -10,7 +10,6 @@
#include <zlib.h>
#include <time.h>
#include <ruby/io.h>
-#include <fcntl.h>
#ifdef HAVE_VALGRIND_MEMCHECK_H
# include <valgrind/memcheck.h>
@@ -3413,13 +3412,6 @@ rb_gzreader_initialize(int argc, VALUE *argv, VALUE obj)
Data_Get_Struct(obj, struct gzfile, gz);
rb_scan_args(argc, argv, "1:", &io, &opt);
-#ifdef O_BINARY
- if (BUILTIN_TYPE(io) == T_FILE) {
- rb_io_t *fptr;
- GetOpenFile(io, fptr);
- setmode(fptr->fd, O_BINARY);
- }
-#endif
/* this is undocumented feature of zlib */
err = inflateInit2(&gz->z.stream, -MAX_WBITS);
diff --git a/version.h b/version.h
index 711c277788..4ab468da26 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 89
+#define RUBY_PATCHLEVEL 90
#define RUBY_RELEASE_DATE "2012-02-11"
#define RUBY_RELEASE_YEAR 2012