diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-08 17:35:41 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-08 17:35:41 +0000 |
commit | ecc1dedabbb91ef3a8b14983c48fcb1b49a9be42 (patch) | |
tree | 04360f2d45e4d206d94747d080d9602c6b89aabb /ext | |
parent | a5fdfa5884e56ecb700c0b241e8e57a8afa3b34f (diff) | |
download | ruby-ecc1dedabbb91ef3a8b14983c48fcb1b49a9be42.tar.gz |
* ext/zlib/zlib.c (rb_deflate_init_copy): Copy buffers as well.
[ruby-list:45018]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/zlib/zlib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 66616fb09f..c6c52b7454 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1126,6 +1126,9 @@ rb_deflate_init_copy(VALUE self, VALUE orig) if (err != Z_OK) { raise_zlib_error(err, 0); } + z1->input = NIL_P(z2->input) ? Qnil : rb_str_dup(z2->input); + z1->buf = NIL_P(z2->buf) ? Qnil : rb_str_dup(z2->buf); + z1->buf_filled = z2->buf_filled; z1->flags = z2->flags; return self; |