Project

General

Profile

Bug #10309

Unexpected keyword parameters becomes an additional mandatory parameter

Added by ko1 (Koichi Sasada) over 5 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Normal
Target version:
ruby -v:
2.2 to 2.0
[ruby-core:65334]

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]

Related issues

Related to Ruby master - Bug #10142: named params don't always capture passed named argsRejected08/15/2014Actions

Updated by ko1 (Koichi Sasada) over 5 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) over 5 years ago

  • Related to Bug #10142: named params don't always capture passed named args added

Also available in: Atom PDF