[#92070] [Ruby trunk Feature#15667] Introduce malloc_trim(0) in full gc cycles — sam.saffron@...
Issue #15667 has been updated by sam.saffron (Sam Saffron).
3 messages
2019/04/01
[ruby-core:92193] [Ruby trunk Bug#15753] unknown keyword when passing an hash to a method that accepts a default argument and a named argument
From:
merch-redmine@...
Date:
2019-04-08 02:35:09 UTC
List:
ruby-core #92193
Issue #15753 has been updated by jeremyevans0 (Jeremy Evans).
I believe this is the same issue as #12717. We are trying to address this issue in #14183.
----------------------------------------
Bug #15753: unknown keyword when passing an hash to a method that accepts a default argument and a named argument
https://bugs.ruby-lang.org/issues/15753#change-77518
* Author: localhostdotdev (localhost .dev)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.7.0dev (2019-03-18 trunk 67296) [x86_64-darwin17] / ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin17]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
e.g.
```ruby
>> def a(b = {}, c: 1); p [b, c]; end; a(a: 1)
Traceback (most recent call last):
3: from (irb):3
2: from (irb):3:in `rescue in irb_binding'
1: from (irb):3:in `a'
ArgumentError (unknown keyword: a)
```
Prettier version:
```ruby
def do_something(thing = {}, force: true)
# doing things
end
do_something({ user: { id: 1 } })
# => ArgumentError (unknown keyword: user)
```
Tested on ruby-head from ~1 month ago and ruby 2.6.2
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>