Issue #12048 has been updated by Nobuyoshi Nakada.
Description updated
Status changed from Open to Rejected
It's same as
```ruby
def y(b: nil) end
x = {c: 1}
y(x)
```
Keyword arguments are passed as a `Hash`, `x` here.
----------------------------------------
Bug #12048: "Unknown keyword" error when calling function with keyword argument inside parameter
https://bugs.ruby-lang.org/issues/12048#change-56887
* Author: Ewout VT
* Status: Rejected
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Contents of attached file ruby_bug.rb
~~~ruby
def x(a) ; a ; end
def y(*a, b: nil) ; end
y(x(c: 1))
~~~
~~~
$ ruby ruby_bug.rb
ruby_bug.rb:2:in `y': unknown keyword: c (ArgumentError)
from ruby_bug.rb:3:in `<main>'
~~~
Not only ruby 2.3 is affected, same hehavior on ruby 2.2.3, 2.2.4 and 2.1.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>