mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
[PRISM] Use depth_offset not transparent scopes for FOR
This commit is contained in:
parent
ce5f5ca1d6
commit
3b21932d14
1 changed files with 1 additions and 0 deletions
|
@ -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: {
|
case PM_FOR_NODE: {
|
||||||
pm_for_node_t *cast = (pm_for_node_t *)node;
|
pm_for_node_t *cast = (pm_for_node_t *)node;
|
||||||
scope->body = (pm_node_t *)cast->statements;
|
scope->body = (pm_node_t *)cast->statements;
|
||||||
|
scope->local_depth_offset += 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
|
case PM_INTERPOLATED_REGULAR_EXPRESSION_NODE: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue