From d6d24991bdd894f92681960117aaf0393866434b Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 3 Feb 2011 09:35:55 +0000 Subject: * ext/zlib/zlib.c (gzfile_reader_get_unused): use rb_str_new_shared because gz->z.input is hidden string. [ruby-core:35057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/zlib/zlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zlib') diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index f119a17bf6..43448818d3 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -2471,7 +2471,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_new_shared(gz->z.input); OBJ_TAINT(str); /* for safe */ return str; } -- cgit v1.2.3