Remove write barrier for non-Ruby object

enumerator's meth attribute is an ID, which is not a Ruby object, so we
should not apply the write barrier on it.
This commit is contained in:
Peter Zhu committed 2024-09-23 15:51:16 -04:00
1 parent 19c617b51d
commit fc043a2e61
1 file changed
+1 -1
Notes: git 2024-09-23 19:51:37 +00:00
+1 -1
View File
@@ -506,7 +506,7 @@ enumerator_init_copy(VALUE obj, VALUE orig)
}
RB_OBJ_WRITE(obj, &ptr1->obj, ptr0->obj);
RB_OBJ_WRITE(obj, &ptr1->meth, ptr0->meth);
ptr1->meth = ptr0->meth;
RB_OBJ_WRITE(obj, &ptr1->args, ptr0->args);
ptr1->fib = 0;
ptr1->lookahead = Qundef;