Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -58,6 +58,11 @@ public Object executeDispatch(
final Object[] argumentsObjects) {
CompilerDirectives.transferToInterpreterAndInvalidate();

// Make sure to have an up-to-date Shape.
if (receiverObject instanceof DynamicObject) {
((DynamicObject) receiverObject).updateShape();
}

final DispatchNode dispatch = atomic(new Callable<DispatchNode>() {
@Override
public DispatchNode call() throws Exception {
@@ -160,9 +165,6 @@ private DispatchNode doDynamicObject(
callerClass = getContext().getCoreLibrary().getMetaClass(RubyArguments.getSelf(frame.getArguments()));
}

// Make sure to have an up-to-date Shape.
((DynamicObject) receiverObject).updateShape();

final InternalMethod method = lookup(callerClass, receiverObject, toString(methodName), ignoreVisibility);

if (method == null) {

0 comments on commit 021fa27

Please sign in to comment.