Project

General

Profile

Actions

Backport #7922

closed

Keyword arguments bug with unnamed rest

Added by marcandre (Marc-Andre Lafortune) almost 12 years ago. Updated almost 12 years ago.


Description

We have:

def foo(**ignore_all_options)
end

foo(bar: 42) # => nil, OK
method(:foo).parameters # => [[:keyrest, :ignore_all_options]], OK

But:

def foo(**)
end

foo(bar: 42) # => ArgumentError: unknown keyword: bar, expected nil
method(:foo).parameters # => [], expected [[:keyrest]]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0