Project

General

Profile

Actions

Bug #7663

closed

Unable to invoke a method with `**kwargs` if the receiver doesn't define keyword arguments

Added by wycats (Yehuda Katz) almost 12 years ago. Updated almost 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
2.0.0dev
Backport:
[ruby-core:51270]

Description

This works:

def hello
puts "hello"
end

hello(*[])

This does not:

def hello
puts "hello"
end

hello(**{})

I may be misunderstanding the idea behind the keyword arguments, but I would expect them to behave similarly to regular arguments when used with splat.

Actions

Also available in: Atom PDF

Like0
Like0Like0