Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parser translator scope issues for implicit hash values #3423

Merged

Conversation

Earlopain
Copy link
Contributor

builder.pair_label is no good since it makes use of variables that the parser gem encountered. Since the prism translator doesn't keep proper track of that information, the following code interprets the implicit value as a local variable, even though it is not in scope:

def foo
  bar = 123
end

{ bar: }

`builder.pair_label` is no good since it makes use of variables that the parser gem encountered.
Since the prism translator doesn't keep proper track of that information, the following code interprets
the implicit value as a local variable, even though it is not in scope:

```rb
def foo
  bar = 123
end

{ bar: }
```
@kddnewton kddnewton merged commit 9b4ebf4 into ruby:main Jan 20, 2025
57 checks passed
@Earlopain Earlopain deleted the parser-translator-hash-value-omission branch January 20, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants