Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ public Object dispatchReadConstant(
return constant.getValue();
}

final RubyClass callerClass = box.box(RubyArguments.getSelf(frame.getArguments())).getMetaClass();
final RubyClass callerClass = ignoreVisibility ? null : box.box(RubyArguments.getSelf(frame.getArguments())).getMetaClass();

final RubyMethod missingMethod = lookup(callerClass, receiverObject, "const_missing", ignoreVisibility,
dispatchAction);
@@ -111,7 +111,7 @@ public Object dispatch(
// Need to be much more fine grained with TruffleBoundary here
CompilerDirectives.transferToInterpreter();

final RubyClass callerClass = box.box(RubyArguments.getSelf(frame.getArguments())).getMetaClass();
final RubyClass callerClass = ignoreVisibility ? null : box.box(RubyArguments.getSelf(frame.getArguments())).getMetaClass();

final RubyMethod method = lookup(callerClass, receiverObject, methodName.toString(),
ignoreVisibility, dispatchAction);
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ private Object doUnboxedObject(
Dispatch.DispatchAction dispatchAction,
Object methodReceiverObject) {
final RubyBasicObject boxedReceiverObject = getContext().getCoreLibrary().box(receiverObject);
final RubyClass callerClass = getContext().getCoreLibrary().box(RubyArguments.getSelf(frame.getArguments())).getMetaClass();
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,
@@ -164,7 +164,7 @@ private Object doRubyBasicObject(
Dispatch.DispatchAction dispatchAction,
Object methodReceiverObject) {
final RubyBasicObject boxedReceiverObject = getContext().getCoreLibrary().box(receiverObject);
final RubyClass callerClass = getContext().getCoreLibrary().box(RubyArguments.getSelf(frame.getArguments())).getMetaClass();
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,

0 comments on commit bc642f4

Please sign in to comment.