File tree 2 files changed +6
-1
lines changed
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)
409
409
RBASIC (dest )-> flags &= ~(T_MASK |FL_EXIVAR );
410
410
// Copies the shape id from obj to dest
411
411
RBASIC (dest )-> flags |= RBASIC (obj )-> flags & (T_MASK |FL_EXIVAR );
412
- rb_copy_generic_ivar (dest , obj );
413
412
if (RB_TYPE_P (obj , T_OBJECT )) {
414
413
rb_obj_copy_ivar (dest , obj );
415
414
}
415
+ else {
416
+ rb_copy_generic_ivar (dest , obj );
417
+ }
416
418
rb_gc_copy_attributes (dest , obj );
417
419
}
418
420
Original file line number Diff line number Diff line change @@ -2438,6 +2438,9 @@ rb_copy_generic_ivar(VALUE dest, VALUE obj)
2438
2438
2439
2439
clear :
2440
2440
if (FL_TEST (dest , FL_EXIVAR )) {
2441
+ #if SHAPE_IN_BASIC_FLAGS
2442
+ RBASIC_SET_SHAPE_ID (dest , ROOT_SHAPE_ID );
2443
+ #endif
2441
2444
rb_free_generic_ivar (dest );
2442
2445
FL_UNSET (dest , FL_EXIVAR );
2443
2446
}
You can’t perform that action at this time.
0 commit comments