summaryrefslogtreecommitdiff
path: root/prism_compile.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-10-04 13:57:14 -0400
committerKevin Newton <[email protected]>2024-10-04 15:04:26 -0400
commit30038656aa3a4931abefd99b8166c26599d168fd ()
tree84ad3eb5e1d838f0a269508058071fd64f7f633c /prism_compile.c
parentf77517f473c38e3fcef72c23de977a44da881caf (diff)
Fix intermediate array off-by-one error
Co-authored-by: Adam Hess <[email protected]>
Notes: Merged: https://.com/ruby/ruby/pull/11800
-rw-r--r--prism_compile.c2
1 files changed, 2 insertions, 0 deletions
@@ -6797,6 +6797,8 @@ pm_compile_array_node(rb_iseq_t *iseq, const pm_node_t *node, const pm_node_list
// Create the temporary array.
for (; tmp_array_size; tmp_array_size--)
rb_ary_push(tmp_array, pm_static_literal_value(iseq, elements->nodes[index++], scope_node));
OBJ_FREEZE(tmp_array);
// Emit the optimized code.