Skip to content

Commit

Permalink
Clear an intermediate hash [Bug #17735]
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Mar 28, 2021
1 parent 31e0382 commit 5e5fb72
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

1 comment on commit 5e5fb72

@kachick
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh thank you! This looks a imrovement or fix of #4294 🙏
Honestly, I don't know why this change is needed 🤔 😅

Please sign in to comment.