summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2025-06-14 00:20:18 -0700
committerJohn Hawthorn <[email protected]>2025-06-18 10:18:10 -0700
commitd5adf8511699648b1cff97ca4bd89c63944b8324 (patch)
tree4f5b57a45a4913a5e54b7606b49537d82a05e4f0
parent121f967bcdcbaf11dc23657c15c655324f8059d9 (diff)
Add write barrier to rb_cHash_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 988f6d5a83..63f42b25bf 100644
--- a/compile.c
+++ b/compile.c
@@ -3516,7 +3516,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
iobj->insn_id = BIN(opt_hash_freeze);
iobj->operand_size = 2;
iobj->operands = compile_data_calloc2(iseq, iobj->operand_size, sizeof(VALUE));
- iobj->operands[0] = rb_cHash_empty_frozen;
+ RB_OBJ_WRITE(iseq, &iobj->operands[0], rb_cHash_empty_frozen);
iobj->operands[1] = (VALUE)ci;
ELEM_REMOVE(next);
}