Revision
4550
Author
watson1978@gmail.com
Date
2010-09-28 06:35:28 -0700 (Tue, 28 Sep 2010)

Log Message

Fixed a Zlib::GzipReader#readlines.

Modified Paths

Diff

Modified: MacRuby/trunk/ext/zlib/zlib.c (4549 => 4550)


--- MacRuby/trunk/ext/zlib/zlib.c	2010-09-28 08:28:37 UTC (rev 4549)
+++ MacRuby/trunk/ext/zlib/zlib.c	2010-09-28 13:35:28 UTC (rev 4550)
@@ -502,8 +502,7 @@
         return zstream_detach_buffer(z);
     }
 
-    rb_bstr_resize(z->buf, len);
-    dst = z->buf;
+    dst = rb_str_subseq(z->buf, 0, len);
     z->buf_filled -= len;
     UInt8 *buf = BSTRING_PTR(z->buf);
     memmove(buf, buf + len, z->buf_filled);