public IRubyObject interpret(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
IRubyObject arg = getArgsNode().interpret(runtime, context, self, aBlock);
Block block = getBlock(context, self);
if (arg instanceof RubyArray) {
RubyArray nodes = (RubyArray) arg;
switch (nodes.size()) {
case 0:
return callAdapter.callIter(context, self, self, block);
case 1:
return callAdapter.callIter(context, self, self, nodes.eltInternal(0), block);
case 2:
return callAdapter.callIter(context, self, self, nodes.eltInternal(0), nodes.eltInternal(1), block);
case 3:
return callAdapter.callIter(context, self, self, nodes.eltInternal(0), nodes.eltInternal(1), nodes.eltInternal(2), block);
default:
return callAdapter.callIter(context, self, self, nodes.toJavaArrayMaybeUnsafe(), block);
}
}
return callAdapter.callIter(context, self, self, arg, block);
}