File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -409,10 +409,12 @@ init_copy(VALUE dest, VALUE obj)
409409 RBASIC (dest )-> flags &= ~(T_MASK |FL_EXIVAR );
410410 // Copies the shape id from obj to dest
411411 RBASIC (dest )-> flags |= RBASIC (obj )-> flags & (T_MASK |FL_EXIVAR );
412- rb_copy_generic_ivar (dest , obj );
413412 if (RB_TYPE_P (obj , T_OBJECT )) {
414413 rb_obj_copy_ivar (dest , obj );
415414 }
415+ else {
416+ rb_copy_generic_ivar (dest , obj );
417+ }
416418 rb_gc_copy_attributes (dest , obj );
417419}
418420
Original file line number Diff line number Diff line change @@ -2438,6 +2438,9 @@ rb_copy_generic_ivar(VALUE dest, VALUE obj)
24382438
24392439 clear :
24402440 if (FL_TEST (dest , FL_EXIVAR )) {
2441+ #if SHAPE_IN_BASIC_FLAGS
2442+ RBASIC_SET_SHAPE_ID (dest , ROOT_SHAPE_ID );
2443+ #endif
24412444 rb_free_generic_ivar (dest );
24422445 FL_UNSET (dest , FL_EXIVAR );
24432446 }
You can’t perform that action at this time.
0 commit comments