summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2025-06-12 15:06:38 -0700
committerJohn Hawthorn <[email protected]>2025-06-18 10:18:10 -0700
commit1bfd6493c02a2f964b76f505b3ebd8966e37ea7e (patch)
tree4f570a92aabbd2f92cc9ebdde618d837c501f18a
parentd5adf8511699648b1cff97ca4bd89c63944b8324 (diff)
Add write barrier to rb_cArray_empty_frozen
Found by wbcheck
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13646
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 63f42b25bf..9d7f33f3a6 100644
--- a/compile.c
+++ b/compile.c
@@ -3493,7 +3493,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
iobj->insn_id = BIN(opt_ary_freeze);
iobj->operand_size = 2;
iobj->operands = compile_data_calloc2(iseq, iobj->operand_size, sizeof(VALUE));
- iobj->operands[0] = rb_cArray_empty_frozen;
+ RB_OBJ_WRITE(iseq, &iobj->operands[0], rb_cArray_empty_frozen);
iobj->operands[1] = (VALUE)ci;
ELEM_REMOVE(next);
}