Skip to content

Conversation

@Earlopain
Copy link
Collaborator

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