aboutsummaryrefslogtreecommitdiffstats
path: root/prism_compile.c
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-12-01 13:34:21 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2023-12-01 15:04:13 +0000
commit3b21932d14a354eaedb1fdbe068efdfdc758a6ac (patch)
tree36664a8b7fbb13102c06034260dfb14f33bcf9f3 /prism_compile.c
parentce5f5ca1d64f92e6d7a79dd73930a71d9d00513e (diff)
downloadruby-3b21932d14a354eaedb1fdbe068efdfdc758a6ac.tar.gz
[PRISM] Use depth_offset not transparent scopes for FOR
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 dc1ecb1bf9..5efe391922 100644
--- a/prism_compile.c
+++ b/prism_compile.c
@@ -1375,6 +1375,7 @@ pm_scope_node_init(const pm_node_t *node, pm_scope_node_t *scope, pm_scope_node_
case PM_FOR_NODE: {
pm_for_node_t *cast = (pm_for_node_t *)node;
scope->body = (pm_node_t *)cast->statements;
+ scope->local_depth_offset += 1;
break;
}
case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {