diff options
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r-- | ext/zlib/zlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 43448818d3..5289f83583 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -2471,7 +2471,8 @@ gzfile_reader_get_unused(struct gzfile *gz) } if (NIL_P(gz->z.input)) return Qnil; - str = rb_str_new_shared(gz->z.input); + str = rb_str_dup(gz->z.input); + str = rb_str_resurrect(str); OBJ_TAINT(str); /* for safe */ return str; } |