Skip to content

Commit

Permalink
Merge pull request jruby#7929 from enebo/fix_7918
Browse files Browse the repository at this point in the history
Fixes jruby#7918.  Error with single splat method with keyword arguments
  • Loading branch information
enebo authored Sep 8, 2023
2 parents de820bf + 19799e3 commit dbafe9b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ public static IRubyObject receiveKeywords(ThreadContext context, IRubyObject[] a

args[args.length - 1] = hash;
return UNDEFINED;
} else if (ruby2_keywords_hash && hash.isEmpty()) {
} else if ((callInfo & CALL_SPLATS) != 0 && ruby2_keywords_hash && hash.isEmpty()) {
// case where we somehow (hash.clear) a marked ruby2_keyword. We pass it as keyword even in non-keyword
// accepting methods so it is subtracted from the arity count. Normally empty keyword arguments are not
// passed along but ruby2_keyword is a strange case since it is mutable by users.
Expand Down

0 comments on commit dbafe9b

Please sign in to comment.