ruby / prism

Prism Ruby parser
https://ruby.github.io/prism/
MIT License
790 stars 134 forks source link

Prevent optional block parameter from accepting certain prefixed values #2901

Closed st0012 closed 2 weeks ago

st0012 commented 2 weeks ago

This commit prevents the following unary operators from being accepted as the value prefix of a block's optional parameter:

For example, f { |a = +b| } will now raise a syntax error.

Closes #1570