Actions
Bug #10309
closedUnexpected keyword parameters becomes an additional mandatory parameter
Description
Is it an intentional behaviour?
def foo a, b, c, k1: 1
p [a, b, c, k1]
end
foo 1, 2, {k1: 3, k2: 4}
#=> [1, 2, {:k1=>3, :k2=>4}, 1]
foo 1, 2, k1: 3, k2: 4
#=> [1, 2, {:k1=>3, :k2=>4}, 1]
Updated by ko1 (Koichi Sasada) almost 10 years ago
- Status changed from Open to Rejected
Ah, I'm sorry. It is duplicated ticket (I can't find another ticket).
My misunderstanding.
Updated by ko1 (Koichi Sasada) almost 10 years ago
- Related to Bug #10142: named params don't always capture passed named args added
Actions
Like0
Like0Like0