summaryrefslogtreecommitdiff
path: root/ext/zlib
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-22 09:53:35 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-22 09:53:35 +0000
commit776b8b1fd1932221621b85e0a3176cc69ebb0647 (patch)
tree7e3d7b854428b0f18542412f8be1dae2897d3445 /ext/zlib
parentd2164fc5f2c8d32aaa9a857ca680c8f6d05ed106 (diff)
merge revision(s) 45076: [Backport #9535]
* class.c (rb_mod_init_copy): do nothing if copying self. [ruby-dev:47989] [Bug #9535] * hash.c (rb_hash_initialize_copy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib')
-rw-r--r--ext/zlib/zlib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 391bec1722..ffdd9a0b7d 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -1556,6 +1556,7 @@ rb_deflate_init_copy(VALUE self, VALUE orig)
Data_Get_Struct(self, struct zstream, z1);
z2 = get_zstream(orig);
+ if (z1 == z2) return self;
err = deflateCopy(&z1->stream, &z2->stream);
if (err != Z_OK) {
raise_zlib_error(err, 0);