ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:73687] [Ruby trunk Bug#12048] "Unknown keyword" error when calling function with keyword argument inside parameter
       [not found] <redmine.issue-12048.20160203133157@ruby-lang.org>
@ 2016-02-03 13:31 ` rubybugs
  2016-02-04  1:14 ` [ruby-core:73690] [Ruby trunk Bug#12048][Rejected] " nobu
  1 sibling, 0 replies; 2+ messages in thread
From: rubybugs @ 2016-02-03 13:31 UTC (permalink / raw
  To: ruby-core

Issue #12048 has been reported by Ewout VT.

----------------------------------------
Bug #12048: "Unknown keyword" error when calling function with keyword argument inside parameter
https://bugs.ruby-lang.org/issues/12048

* Author: Ewout VT
* Status: Open
* 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

~~~
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:73690] [Ruby trunk Bug#12048][Rejected] "Unknown keyword" error when calling function with keyword argument inside parameter
       [not found] <redmine.issue-12048.20160203133157@ruby-lang.org>
  2016-02-03 13:31 ` [ruby-core:73687] [Ruby trunk Bug#12048] "Unknown keyword" error when calling function with keyword argument inside parameter rubybugs
@ 2016-02-04  1:14 ` nobu
  1 sibling, 0 replies; 2+ messages in thread
From: nobu @ 2016-02-04  1:14 UTC (permalink / raw
  To: ruby-core

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-04  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-12048.20160203133157@ruby-lang.org>
2016-02-03 13:31 ` [ruby-core:73687] [Ruby trunk Bug#12048] "Unknown keyword" error when calling function with keyword argument inside parameter rubybugs
2016-02-04  1:14 ` [ruby-core:73690] [Ruby trunk Bug#12048][Rejected] " nobu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).