MethodArgs interpMethod = (MethodArgs)method;
ArgsNode args = interpMethod.getArgsNode();
ListNode requiredArgs = args.getPre();
for (int i = 0; requiredArgs != null && i < requiredArgs.size(); i++) {
Node argNode = requiredArgs.get(i);
if (argNode instanceof MultipleAsgn19Node) {
argsArray.append(RubyArray.newArray(runtime, req));
} else {
argsArray.append(RubyArray.newArray(runtime, req, getNameFrom(runtime, (INameNode)argNode)));
}
}
ListNode optArgs = args.getOptArgs();
for (int i = 0; optArgs != null && i < optArgs.size(); i++) {
argsArray.append(RubyArray.newArray(runtime, opt, getNameFrom(runtime, (INameNode) optArgs.get(i))));
}
if (args.getRestArg() >= 0) {
RestArgNode restArg = (RestArgNode) args.getRestArgNode();
if (restArg instanceof UnnamedRestArgNode) {
if (((UnnamedRestArgNode) restArg).isStar()) {
argsArray.append(RubyArray.newArray(runtime, rest));
}
} else {
argsArray.append(RubyArray.newArray(runtime, rest, getNameFrom(runtime, args.getRestArgNode())));
}
}
ListNode requiredArgsPost = args.getPost();
for (int i = 0; requiredArgsPost != null && i < requiredArgsPost.size(); i++) {
Node argNode = requiredArgsPost.get(i);
if (argNode instanceof MultipleAsgn19Node) {
argsArray.append(RubyArray.newArray(runtime, req));
} else {
argsArray.append(RubyArray.newArray(runtime, req, getNameFrom(runtime, (INameNode) requiredArgsPost.get(i))));
}