|
25 | 25 | import org.truffleruby.language.RubyNode;
|
26 | 26 | import org.truffleruby.language.RubyProcRootNode;
|
27 | 27 | import org.truffleruby.language.SourceIndexLength;
|
| 28 | +import org.truffleruby.language.arguments.ArgumentsDescriptor; |
| 29 | +import org.truffleruby.language.arguments.EmptyArgumentsDescriptor; |
| 30 | +import org.truffleruby.language.arguments.KeywordArgumentsDescriptor; |
28 | 31 | import org.truffleruby.language.arguments.MissingArgumentBehavior;
|
29 | 32 | import org.truffleruby.language.arguments.ReadPreArgumentNode;
|
30 | 33 | import org.truffleruby.language.arguments.ShouldDestructureNode;
|
@@ -485,12 +488,15 @@ public RubyNode visitZSuperNode(ZSuperParseNode node) {
|
485 | 488 | final ArgsParseNode argsNode = methodArgumentsTranslator.argsNode;
|
486 | 489 | final SequenceNode reloadSequence = (SequenceNode) reloadTranslator.visitArgsNode(argsNode);
|
487 | 490 |
|
| 491 | + final ArgumentsDescriptor descriptor = argsNode.hasKwargs() |
| 492 | + ? KeywordArgumentsDescriptor.INSTANCE |
| 493 | + : EmptyArgumentsDescriptor.INSTANCE; |
488 | 494 | final RubyNode arguments = new ReadZSuperArgumentsNode(
|
489 | 495 | reloadTranslator.getRestParameterIndex(),
|
490 | 496 | reloadSequence.getSequence());
|
491 | 497 | final RubyNode block = executeOrInheritBlock(argumentsAndBlock.getBlock(), node);
|
492 | 498 |
|
493 |
| - RubyNode callNode = new SuperCallNode(arguments, block, null); |
| 499 | + RubyNode callNode = new SuperCallNode(arguments, block, descriptor); |
494 | 500 | callNode = wrapCallWithLiteralBlock(argumentsAndBlock, callNode);
|
495 | 501 |
|
496 | 502 | return withSourceSection(sourceSection, callNode);
|
|
0 commit comments