Skip to content

Commit dcb04ba

Browse files
committed
vm_setivar_default: trigger write barrier on the fields_obj, not obj
1 parent 7c46fef commit dcb04ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vm_insnhelper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ vm_setivar_default(VALUE obj, ID id, VALUE val, shape_id_t dest_shape_id, attr_i
14821482

14831483
VALUE fields_obj = rb_obj_fields(obj, id);
14841484
RUBY_ASSERT(fields_obj);
1485-
RB_OBJ_WRITE(obj, &rb_imemo_fields_ptr(fields_obj)[index], val);
1485+
RB_OBJ_WRITE(fields_obj, &rb_imemo_fields_ptr(fields_obj)[index], val);
14861486

14871487
if (shape_id != dest_shape_id) {
14881488
RBASIC_SET_SHAPE_ID(obj, dest_shape_id);

0 commit comments

Comments
 (0)