Actions
Bug #20974
closedRequired and optional anonymous parameter show differently in Proc#parameters
Bug #20974:
Required and optional anonymous parameter show differently in Proc#parameters
Description
The following has had the same output since Ruby 1.9, when Proc#parameters was introduced:
p(proc { |(_a)| }.parameters) # => [[:opt, nil]]
p(lambda { |(_a)| }.parameters) # => [[:req]]
I think they should be [[:opt]] and [[:req]] or [[:opt, nil]] and [[:req, nil]]. I prefer the nil-free option since that feels more anonymous.
Actions