In Ruby 3.3 and later, the expression -> { yield } raises a syntax error.
Actual Behavior:
The latest version of the Parser gem (3.3.5.0) still follows the behavior of Ruby 3.2 and earlier, which successfully parsed without parse error when attempting to parse -> { yield }.
The following changes have been made between Ruby 3.2 and earlier and 3.3 and later:
Ruby 3.2 and earlier:
Ruby 3.3 and later:
Expected Behavior:
In Ruby 3.3 and later, the expression
-> { yield }
raises a syntax error.Actual Behavior:
The latest version of the
Parser
gem (3.3.5.0) still follows the behavior of Ruby 3.2 and earlier, which successfully parsed without parse error when attempting to parse-> { yield }
.For example: