diff options
author | Peter Zhu <[email protected]> | 2023-02-02 14:43:30 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-02-02 14:43:50 -0500 |
commit | 5b34839b0f9d164552f8da41b6ced2db1d2af3be (patch) | |
tree | a8775a23437c0745936c8eb2cbe00c518b6b2488 /hash.c | |
parent | 65ca14ea6e12d2e0bf2aff60538c8ca291c65fd3 (diff) |
Remove redundant else if statement in hash.c
Hashes can only be ar or st, so the else if is redundant.
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1576,10 +1576,12 @@ static VALUE hash_copy(VALUE ret, VALUE hash) { if (!RHASH_EMPTY_P(hash)) { - if (RHASH_AR_TABLE_P(hash)) + if (RHASH_AR_TABLE_P(hash)) { ar_copy(ret, hash); - else if (RHASH_ST_TABLE_P(hash)) + } + else { RHASH_ST_TABLE_SET(ret, st_copy(RHASH_ST_TABLE(hash))); + } } return ret; } |