summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-28 09:42:26 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-28 09:42:26 +0900
commit5e5fb72f99701dc27c66ab148471893f14e6d6f0 (patch)
treeef81ee5c40810d58305b26fa8e5f5e0e8d27120b
parent31e0382723bfb35cffe3ca485dd0577668cafa07 (diff)
Clear an intermediate hash [Bug #17735]
-rw-r--r--hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index d6d3752..00beadf 100644
--- a/hash.c
+++ b/hash.c
@@ -3292,6 +3292,7 @@ rb_hash_transform_keys_bang(int argc, VALUE *argv, VALUE hash)
rb_hash_aset(hash, new_key, val);
rb_hash_aset(new_keys, new_key, Qnil);
}
+ rb_hash_clear(new_keys);
}
return hash;
}