summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/zlib/zlib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 824dd13..db09af6 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -814,8 +814,7 @@ zstream_shift_buffer(struct zstream *z, long len)
return zstream_detach_buffer(z);
}
- dst = rb_str_subseq(z->buf, 0, len);
- rb_obj_reveal(dst, rb_cString);
+ dst = rb_str_new(RSTRING_PTR(z->buf), len);
z->buf_filled -= len;
memmove(RSTRING_PTR(z->buf), RSTRING_PTR(z->buf) + len,
z->buf_filled);