Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

IR: Fix a few kwargs execution bugs by asking Argsnode instead of sco…

…pe if it has kwargs
  • Loading branch information...
commit 743a08f483a7db4cca416b517acc47291c0ead3b 1 parent 2d9bff8
@enebo enebo authored
4 core/src/main/java/org/jruby/ast/
@@ -154,6 +154,10 @@ protected Arity calculateArity() {
return Arity.createArity(getRequiredArgsCount());
+ public boolean hasKwargs() {
+ return hasKwargs;
+ }
protected boolean hasMasgnArgs() {
if (preCount > 0) for (Node node : pre.childNodes()) {
if (node instanceof AssignableNode) return true;
2  core/src/main/java/org/jruby/ir/
@@ -1914,7 +1914,7 @@ protected void receiveNonBlockArgs(final ArgsNode argsNode, IRScope s) {
// (a) on inlining, we'll be able to get rid of these checks in almost every case.
// (b) compiler to bytecode will anyway generate this and this is explicit.
// For now, we are going explicit instruction route. But later, perhaps can make this implicit in the method setup preamble?
- addInstr(s, new CheckArityInstr(required, opt, rest, s.receivesKeywordArgs()));
+ addInstr(s, new CheckArityInstr(required, opt, rest, argsNode.hasKwargs()));
// Other args begin at index 0
Please sign in to comment.
Something went wrong with that request. Please try again.