Issue #21875 has been updated by Eregon (Benoit Daloze). There is also `lambda { |a,| a }` which as far as I can tell ignores the trailing comma: ```ruby irb(main):015> proc { |a,| a }.call([1,2]) => 1 irb(main):016> lambda { |a,| a }.call([1,2]) => [1, 2] irb(main):017> -> (a,) { a } <internal:kernel>:168:in 'Kernel#loop': (irb):17: syntax error found (SyntaxError) irb(main):020> proc { |a,| a }.call(1,2) => 1 irb(main):021> lambda { |a,| a }.call(1,2) (irb):21:in 'block in <top (required)>': wrong number of arguments (given 2, expected 1) (ArgumentError) irb(main):022> lambda { |a,*| a }.call(1,2) => 1 ``` I think since there seems to be no need to change anything for lambdas/procs in this regard I would suggest to change nothing. It's extremely rare to have a multi-line definition of lambda arguments, isn't it? So let's not make the semantics more complicated or incompatible for such a case. ---------------------------------------- Feature #21875: Handling of trailing commas in lambda parameters https://bugs.ruby-lang.org/issues/21875#change-116412 * Author: Earlopain (Earlopain _) * Status: Open ---------------------------------------- https://bugs.ruby-lang.org/issues/19107 was accepted, which is about trailing commands in method definitions. lambdas were not explicitly mentioned but I wanted to confirm how they should behave with a trailing comma. Or if a trailing comma should even be accepted for them. It's not clear to me since lambdas sometimes behave like blocks and sometimes more like methods. `->(...) {}` for example is syntax invalid (same as in blocks) but they do check their arity with blocks don't do. If a trailing comma is accepted it can either * be implicit splat like in `foo do |bar,|; end` or `foo do |bar|; end`. It would also mean that the trailing comma is only allowed after a positional argument. * Just be ignored and be accepted in most places like for method definitions. The first option would be rather useless in regards to https://bugs.ruby-lang.org/issues/19107 when you just want to add the comma for cleaner diffs. But I guess for lambdas this happens very rarely anyways. -- https://bugs.ruby-lang.org/