aboutsummaryrefslogtreecommitdiffstats
path: root/prism_compile.c
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-11-30 12:05:48 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2023-11-30 21:31:57 +0000
commit0c7c654b4da008fe18ebc822b1d76ee656eded01 (patch)
treecf91404a972b3fa88a96630e6cf028a6a0436595 /prism_compile.c
parent57782d3d47bcb52af0006ac75e75f3b3609b1d31 (diff)
downloadruby-0c7c654b4da008fe18ebc822b1d76ee656eded01.tar.gz
[Prism] Fix local variable access for POST_EXECUTION_NODE
Diffstat (limited to 'prism_compile.c')
-rw-r--r--prism_compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/prism_compile.c b/prism_compile.c
index 2370b28982..dc1ecb1bf9 100644
--- a/prism_compile.c
+++ b/prism_compile.c
@@ -1398,6 +1398,7 @@ pm_scope_node_init(const pm_node_t *node, pm_scope_node_t *scope, pm_scope_node_
case PM_POST_EXECUTION_NODE: {
pm_post_execution_node_t *cast = (pm_post_execution_node_t *) node;
scope->body = (pm_node_t *) cast->statements;
+ scope->local_depth_offset += 2;
break;
}
case PM_PROGRAM_NODE: {