summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-08 11:25:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-08 11:25:06 +0000
commitcf85aaf83e48c8e2492432673b7e0f88ed4c97a9 (patch)
tree504d3e0cff2c6837e04db1883a9d9755bf388e30 /hash.c
parent0727a22c69641c98edd50668322d8f0270bec457 (diff)
hash.c: reject shoult infect
* hash.c (rb_hash_reject): result should be infected by the receiver. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 7e18a40..53d70f9 100644
--- a/hash.c
+++ b/hash.c
@@ -1119,6 +1119,7 @@ rb_hash_reject(VALUE hash)
RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
ret = hash_alloc(rb_obj_class(hash));
+ OBJ_INFECT(ret, hash);
if (!RHASH_EMPTY_P(hash)) {
rb_hash_foreach(hash, reject_i, ret);
}