
Issue #19971 has been updated by shan (Shannon Skipper). Ah, I see. Thanks for clarifying! FWIW, lambdas don't ack the implicit rest either. ---------------------------------------- Misc #19971: Confusing arity of a Proc with implicit rest parameter https://bugs.ruby-lang.org/issues/19971#change-105065 * Author: andrykonchin (Andrew Konchin) * Status: Open * Priority: Normal ---------------------------------------- I've noticed that such proc `proc { |a,| }` has arity `1` that means 1 required parameter, but behaves like there is a rest parameter (`proc { |a, *| }`) that has arity `-2` (that means 1 required parameter + rest parameter). So I am wondering whether it's intentional behaviour and what the rational is behind it. -- https://bugs.ruby-lang.org/