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

+ ruby27.y: removed opt_block_args_tail: tOROP rule. #635

Merged

Conversation

iliabylich
Copy link
Collaborator

This rule was the only one that didn't unset current_arg.
Thus, def foo(var: bar { || var }) var end is now a valid syntax.

This commit tracks upstream commits ruby/ruby@7c22898 and ruby/ruby@ed90ec3.

Closes #629 (that allows this syntax by fixing this rule)
Closes #630 (that removes the rule and changes lexer to emit a different sequence of terminals and use a different rule that allows new syntax).
It's easier to apply them both.

This rule was the only one that didn't unset current_arg.
Thus, it allows `def foo(var: bar { || var }) var end`.

This commit tracks upstream commits ruby/ruby@7c22898 and ruby/ruby@ed90ec3.
@iliabylich iliabylich merged commit 883bce6 into whitequark:master Nov 12, 2019
@iliabylich iliabylich deleted the remove-unused-block-orop-rule branch November 12, 2019 17:56
palkan added a commit to ruby-next/parser that referenced this pull request Nov 20, 2019
* bilych/pattern-matching:
  + ruby27.y: added pattern matching
  + lexer.rl: parse embedded ivars/cvars starting with digit as str (whitequark#639)
  * README.md: documented compatibility issue with EOF chars after… (whitequark#637)
  + lexer.rl: warn on `...` at EOL. (whitequark#636)
  + ruby27.y: removed opt_block_args_tail: tOROP rule. (whitequark#635)
  + ruby27.y: reverted method reference operator (added in whitequark#634)
  + ruby27.y: treat numparams as locals outside numblock. (whitequark#633)
  * ruby27.y: refactor logic around 'circular argument reference'(whitequark#628)
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.

ruby/ruby@7c22898 - removing redundant rule ruby/ruby@ed90ec3
1 participant