protected final T findCallableArityThree(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { T callable = this.javaCallable; if ( callable == null ) { // TODO: varargs? final T[] callablesForArity; if ( javaCallables.length <= 3 || (callablesForArity = javaCallables[3]) == null ) { if ( ( callable = matchVarArgsCallableArityThree(self, arg0, arg1, arg2) ) == null ) { throw runtime.newArgumentError(3, javaCallables.length - 1); } return callable; } callable = CallableSelector.matchingCallableArityThree(runtime, this, callablesForArity, arg0, arg1, arg2); if ( callable == null ) { if ( ( callable = matchVarArgsCallableArityThree(self, arg0, arg1, arg2) ) == null ) { throw newErrorDueArgumentTypeMismatch(self, callablesForArity, arg0, arg1, arg2); } } } else { if (!callable.isVarArgs()) checkCallableArity(callable, 3); } return callable; }
protected final T findCallableArityThree(IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { T callable = this.javaCallable; if ( callable == null ) { // TODO: varargs? final T[] callablesForArity; if ( javaCallables.length <= 3 || (callablesForArity = javaCallables[3]) == null ) { if ( ( callable = matchVarArgsCallableArityThree(self, arg0, arg1, arg2) ) == null ) { throw runtime.newArgumentError(3, javaCallables.length - 1); } return callable; } callable = CallableSelector.matchingCallableArityThree(runtime, this, callablesForArity, arg0, arg1, arg2); if ( callable == null ) { if ( ( callable = matchVarArgsCallableArityThree(self, arg0, arg1, arg2) ) == null ) { throw newErrorDueArgumentTypeMismatch(self, callablesForArity, arg0, arg1, arg2); } } } else { if (!callable.isVarArgs()) checkCallableArity(callable, 3); } return callable; }