From f769d68a69f0a8c84e46e43179bda6332923fb11 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 24 Jan 2024 17:01:16 -0500 Subject: [PATCH] [PRISM] Fix getblockparamproxy for forwarding arguments --- prism_compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prism_compile.c b/prism_compile.c index 2df3e27e24..a71209e0fd 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -1188,8 +1188,8 @@ pm_setup_args(pm_arguments_node_t *arguments_node, int *flags, struct rb_callinf ADD_INSN1(ret, &dummy_line_node, splatarray, RBOOL(arguments_node_list.size > 1)); - pm_local_index_t dot3_index = pm_lookup_local_index(iseq, scope_node, PM_CONSTANT_DOT3, 0); - ADD_INSN2(ret, &dummy_line_node, getblockparamproxy, INT2FIX(dot3_index.index), INT2FIX(dot3_index.level)); + pm_local_index_t and_index = pm_lookup_local_index(iseq, scope_node, PM_CONSTANT_AND, 0); + ADD_INSN2(ret, &dummy_line_node, getblockparamproxy, INT2FIX(and_index.index + VM_ENV_DATA_SIZE - 1), INT2FIX(and_index.level)); break; }