Actions
Bug #8418
closedwhen all params are optional, named arg hash maps to the first available param
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p195 (2013-05-14 revision 40734) [i686-linux]
Backport:
Description
irb(main):028:0> def foo(arg = 1, options = {}); {arg: arg, options: options}; end; foo(a: 1)
=> {:arg=>{:a=>1}, :options=>{}}
since positional args can't follow the named hash, perhaps the named hash should map to the last possible param?
Actions
Like0
Like0Like0Like0