Object methodReceiverObject) {
final RubyBasicObject boxedReceiverObject = getContext().getCoreLibrary().box(receiverObject);
final RubyClass callerClass = ignoreVisibility ? null : getContext().getCoreLibrary().box(RubyArguments.getSelf(frame.getArguments())).getMetaClass();
if (dispatchAction == Dispatch.DispatchAction.CALL_METHOD || dispatchAction == Dispatch.DispatchAction.RESPOND_TO_METHOD) {
final RubyMethod method = lookup(callerClass, boxedReceiverObject, methodName.toString(), ignoreVisibility,
dispatchAction);
if (method == null) {
final DispatchNode newDispatch = createMethodMissingNode(methodName, boxedReceiverObject, dispatchAction);
return newDispatch.executeDispatch(frame, methodReceiverObject, lexicalScope, boxedReceiverObject,
methodName, blockObject, argumentsObjects, dispatchAction);
}
if (receiverObject instanceof Boolean) {
final Assumption falseUnmodifiedAssumption =
getContext().getCoreLibrary().getFalseClass().getUnmodifiedAssumption();
final RubyMethod falseMethod =
lookup(callerClass, getContext().getCoreLibrary().box(false), methodName.toString(),
ignoreVisibility, dispatchAction);
if (falseMethod == null) {
throw new UnsupportedOperationException();
}
final Assumption trueUnmodifiedAssumption =
getContext().getCoreLibrary().getTrueClass().getUnmodifiedAssumption();
final RubyMethod trueMethod =
lookup(callerClass, getContext().getCoreLibrary().box(true), methodName.toString(),
ignoreVisibility, dispatchAction);
if (trueMethod == null) {
throw new UnsupportedOperationException();