Skip to content

Passing nil as the value of a keyword argument causes JRuby to act as if there were no such keyword argument #1047

@97jaz

Description

@97jaz

The following simple program demonstrates the problem:

def test(foo: 10)
  foo
end

test(foo: nil)

MRI:

2.0.0p247 :006 > test(foo: nil)
 => nil

JRuby:

jruby-1.7.4 :005 >   test(foo: nil)
ArgumentError: unknown keyword: foo
    from (irb):5:in `evaluate'
    from org/jruby/RubyKernel.java:1093:in `eval'
    from org/jruby/RubyKernel.java:1489:in `loop'
    from org/jruby/RubyKernel.java:1254:in `catch'
    from org/jruby/RubyKernel.java:1254:in `catch'
    from /Users/jaz/.rvm/rubies/jruby-1.7.4/bin/irb:13:in `(root)'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions