Project

General

Profile

« Previous | Next » 

Revision be4589df

Added by Stan Lo 11 months ago

[ruby/prism] Prevent optional block parameter from accepting certain prefixed values

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.

https://github.com/ruby/prism/commit/3024bee60c

Co-authored-by: Kevin Newton