Project

General

Profile

« Previous | Next » 

Revision d1a70014

Added by Earlopain (Earlopain _) 6 months ago

[ruby/prism] Fix parser translator ast when using anonymous forwarding in blocks/lambda

Blocks and lambdas inherit anonymous arguments from the method they are a part of.
They themselves don't allow to introduce new anonymous arguments.
While you can write this:

def foo(*)
  bar { |**| }
end

referecing the new parameter inside of the block will always be a syntax error.

https://github.com/ruby/prism/commit/2cbd27e134