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

Same numbered param cannot be used in child blocks #3306

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

tenderlove
Copy link
Member

Raise an exception when the same numbered param is used inside a child block. For example, the following code should be a syntax error:

-> { _1 + -> { _1 } }

Fixes #3291

Raise an exception when the same numbered param is used inside a child
block.  For example, the following code should be a syntax error:

```ruby
-> { _1 + -> { _1 } }
```

Fixes ruby#3291
@tenderlove tenderlove requested a review from kddnewton December 12, 2024 00:32
@tenderlove tenderlove merged commit fbad866 into ruby:main Dec 12, 2024
55 checks passed
@tenderlove tenderlove deleted the numbered-param branch December 12, 2024 00:42
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.

Nested numbered parameter should cause SyntaxError
2 participants