diff options
author | Peter Zhu <[email protected]> | 2022-11-14 11:22:00 -0500 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2022-11-22 13:49:46 -0800 |
commit | 003f8ea80983d9a2c1d5352c448ad2991fb73ad7 (patch) | |
tree | 3cebe6c0fe3507e920126cfdc81446e20c0fd87a /object.c | |
parent | c4e99ac454cbbf731c2fe51fa549bd472ab1dc41 (diff) |
Remove dead code in rb_obj_copy_ivar
The removed code is a duplicate of the code above.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6727
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -302,20 +302,6 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj) if (initial_shape->capacity < shape_to_set_on_dest->capacity) { rb_ensure_iv_list_size(dest, initial_shape->capacity, shape_to_set_on_dest->capacity); dest_buf = ROBJECT_IVPTR(dest); - - rb_shape_t * initial_shape = rb_shape_get_shape(dest); - - if (initial_shape->size_pool_index != src_shape->size_pool_index) { - RUBY_ASSERT(initial_shape->type == SHAPE_T_OBJECT); - - shape_to_set_on_dest = rb_shape_rebuild_shape(initial_shape, src_shape); - } - - RUBY_ASSERT(src_num_ivs <= shape_to_set_on_dest->capacity); - if (initial_shape->capacity < shape_to_set_on_dest->capacity) { - rb_ensure_iv_list_size(dest, initial_shape->capacity, shape_to_set_on_dest->capacity); - dest_buf = ROBJECT_IVPTR(dest); - } } MEMCPY(dest_buf, src_buf, VALUE, src_num_ivs); |