Skip to content

Mixing Hash and keyword arguments raises an error #3138

@robin850

Description

@robin850

Hello,

There's a bug with JRuby 9000 when defining a method that mixes a Hash argument with a keyword argument:

>> def foo(bar = {}, baz: nil)
 | end
=> :foo
>> foo({ "foo" => "bar" })
=> ArgumentError: unknown keyword: foo

This is not a problem with MRI.

Have a nice day!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions