[#65451] [ruby-trunk - Feature #10333] [PATCH 3/1] optimize: "yoda literal" == string — ko1@...

Issue #10333 has been updated by Koichi Sasada.

9 messages 2014/10/07

[ruby-core:65336] [ruby-trunk - Bug #10309] Unexpected keyword parameters becomes an additional mandatory parameter

From: ko1@...
Date: 2014-10-01 08:29:24 UTC
List: ruby-core #65336
Issue #10309 has been updated by Koichi Sasada.

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

----------------------------------------
Bug #10309: Unexpected keyword parameters becomes an additional mandatory parameter
https://bugs.ruby-lang.org/issues/10309#change-49151

* Author: Koichi Sasada
* Status: Rejected
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category: core
* Target version: current: 2.2.0
* ruby -v: 2.2 to 2.0
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
Is it an intentional behaviour?

```ruby
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]
```





-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next