Skip to content

Commit

Permalink
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions core/src/main/java/org/jruby/ext/ripper/RipperParserBase.java
Original file line number Diff line number Diff line change
@@ -210,11 +210,16 @@ public IRubyObject method_optarg(IRubyObject method, IRubyObject arg) {
}

public IRubyObject keyword_arg(IRubyObject key, IRubyObject value) {
RubyHash hash = RubyHash.newHash(context.runtime);
RubyArray array = RubyArray.newArray(context.runtime, 2);

hash.fastASet(key, value);
array.append(key);
if (value != null) {
array.append(value);
} else {
array.append(context.nil);
}

return hash;
return array;
}

public IRubyObject new_args(IRubyObject f, IRubyObject o, IRubyObject r, IRubyObject p, ArgsTailHolder tail) {

0 comments on commit 1d1e883

Please sign in to comment.