return newDispatch.executeDispatch(frame, methodReceiverObject, lexicalScope, receiverObject,
methodName, blockObject, argumentsObjects, dispatchAction);
} else if (dispatchAction == Dispatch.DispatchAction.READ_CONSTANT) {
final RubyModule module = (RubyModule) boxedReceiverObject;
final RubyConstant constant = lookupConstant(lexicalScope, module, methodName.toString(),
ignoreVisibility, dispatchAction);
if (constant == null) {
final DispatchNode newDispatch = createConstantMissingNode(methodName, callerClass, module, dispatchAction);
return newDispatch.executeDispatch(frame, methodReceiverObject, lexicalScope, module,
methodName, blockObject, argumentsObjects, dispatchAction);
}
// The module, the "receiver" is an instance of its singleton class.
// But we want to check the module assumption, not its singleton class assumption.
final DispatchNode newDispatch = CachedBoxedDispatchNodeFactory.create(getContext(), methodName, first,
module.getSingletonClass(null), module.getUnmodifiedAssumption(), constant.getValue(),
null, indirect, null, null, null, null, null, null, null);
first.replace(newDispatch);
return newDispatch.executeDispatch(frame, methodReceiverObject, lexicalScope, receiverObject,
methodName, blockObject, argumentsObjects, dispatchAction);