mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 05:29:10 +02:00
Remove useless set of dest_shape_id in rb_obj_copy_ivar
This commit is contained in:
parent
543f8dcad3
commit
1055e04e28
1 changed files with 1 additions and 3 deletions
4
object.c
4
object.c
|
@ -337,12 +337,10 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj)
|
|||
return;
|
||||
}
|
||||
|
||||
shape_id_t dest_shape_id = src_shape_id;
|
||||
shape_id_t initial_shape_id = RBASIC_SHAPE_ID(dest);
|
||||
|
||||
RUBY_ASSERT(RSHAPE_TYPE_P(initial_shape_id, SHAPE_ROOT));
|
||||
|
||||
dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);
|
||||
shape_id_t dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);
|
||||
if (UNLIKELY(rb_shape_too_complex_p(dest_shape_id))) {
|
||||
st_table *table = rb_st_init_numtable_with_size(src_num_ivs);
|
||||
rb_obj_copy_ivs_to_hash_table(obj, table);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue