Skip to content

Commit 1055e04

Browse files
committed
Remove useless set of dest_shape_id in rb_obj_copy_ivar
1 parent 543f8dc commit 1055e04

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

object.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,10 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj)
337337
return;
338338
}
339339

340-
shape_id_t dest_shape_id = src_shape_id;
341340
shape_id_t initial_shape_id = RBASIC_SHAPE_ID(dest);
342-
343341
RUBY_ASSERT(RSHAPE_TYPE_P(initial_shape_id, SHAPE_ROOT));
344342

345-
dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);
343+
shape_id_t dest_shape_id = rb_shape_rebuild(initial_shape_id, src_shape_id);
346344
if (UNLIKELY(rb_shape_too_complex_p(dest_shape_id))) {
347345
st_table *table = rb_st_init_numtable_with_size(src_num_ivs);
348346
rb_obj_copy_ivs_to_hash_table(obj, table);

0 commit comments

Comments
 (0)