1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/zlib/zlib.c (gzfile_reader_get_unused): no need to dup

before rb_str_resurrect.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-02-03 15:15:04 +00:00
parent b3c80c0591
commit b6371b55de
4 changed files with 10 additions and 7 deletions

View file

@ -1,3 +1,8 @@
Fri Feb 4 00:14:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/zlib/zlib.c (gzfile_reader_get_unused): no need to dup
before rb_str_resurrect.
Thu Feb 3 20:04:44 2011 Tanaka Akira <akr@fsij.org>
* ext/curses/curses.c (CHECK): unused macro removed.

View file

@ -1998,7 +1998,6 @@ gzfile_raise(struct gzfile *gz, VALUE klass, const char *message)
{
VALUE exc = rb_exc_new2(klass, message);
if (!NIL_P(gz->z.input)) {
VALUE rb_str_resurrect(VALUE);
rb_ivar_set(exc, id_input, rb_str_resurrect(gz->z.input));
}
rb_exc_raise(exc);
@ -2471,8 +2470,7 @@ gzfile_reader_get_unused(struct gzfile *gz)
}
if (NIL_P(gz->z.input)) return Qnil;
str = rb_str_dup(gz->z.input);
str = rb_str_resurrect(str);
str = rb_str_resurrect(gz->z.input);
OBJ_TAINT(str); /* for safe */
return str;
}

View file

@ -86,7 +86,7 @@ if defined? Zlib
def test_adler
z = Zlib::Deflate.new
z << "foo"
s = z.finish
z.finish
assert_equal(0x02820145, z.adler)
end
@ -95,7 +95,7 @@ if defined? Zlib
assert_equal(false, z.finished?)
z << "foo"
assert_equal(false, z.finished?)
s = z.finish
z.finish
assert_equal(true, z.finished?)
z.close
assert_raise(Zlib::Error) { z.finished? }

View file

@ -1,11 +1,11 @@
#define RUBY_VERSION "1.9.3"
#define RUBY_RELEASE_DATE "2011-02-03"
#define RUBY_RELEASE_DATE "2011-02-04"
#define RUBY_PATCHLEVEL -1
#define RUBY_BRANCH_NAME "trunk"
#define RUBY_RELEASE_YEAR 2011
#define RUBY_RELEASE_MONTH 2
#define RUBY_RELEASE_DAY 3
#define RUBY_RELEASE_DAY 4
#include "ruby/version.h"