summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
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);
}