summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-05-23 11:11:05 -0400
committerPeter Zhu <peter@peterzhu.ca>2023-05-23 11:11:23 -0400
commit24a6609ccb21af186d1cb73258abddb82e28a9f2 (patch)
treeb63cdf06230320d58ae171f0a330461d4a68603e /hash.c
parent31ac8efca8ecb574e1e7b7c32cce54cb1b97f19a (diff)
Remove dead code in ar_copy
new_tab can no longer ever be NULL so this is dead code.
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/hash.c b/hash.c
index 323e0ad512..9b6d9b9aea 100644
--- a/hash.c
+++ b/hash.c
@@ -1160,10 +1160,6 @@ ar_copy(VALUE hash1, VALUE hash2)
ar_table *old_tab = RHASH_AR_TABLE(hash2);
ar_table *new_tab = RHASH_AR_TABLE(hash1);
- if (new_tab == NULL) {
- new_tab = ar_alloc_table(hash1);
- }
-
*new_tab = *old_tab;
RHASH_AR_TABLE(hash1)->ar_hint.word = RHASH_AR_TABLE(hash2)->ar_hint.word;
RHASH_AR_TABLE_BOUND_SET(hash1, RHASH_AR_TABLE_BOUND(hash2));