diff options
author | Peter Zhu <[email protected]> | 2023-05-23 14:11:54 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-05-23 15:27:56 -0400 |
commit | 9592bc703922933c4196748a0e7221a53ad50b9b (patch) | |
tree | 484b737e73ffd8a4c669bbd5451664c3c9983af6 /hash.c | |
parent | a86f798fc2e979ea83ec55744f906b2a816c8681 (diff) |
Remove dead code in rb_hash_replace
We now always copy the ST table, so we don't need to initialize the ST
table of hash when hash2 is empty.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7846
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -2933,11 +2933,6 @@ rb_hash_replace(VALUE hash, VALUE hash2) rb_gc_writebarrier_remember(hash); } - if (RHASH_EMPTY_P(hash2) && RHASH_ST_TABLE_P(hash2)) { - /* ident hash */ - hash_st_table_init(hash, RHASH_TYPE(hash2), 0); - } - return hash; } |