Skip to content

Commit a121d85

Browse files
committed
Call the proper prepareExecute() to not create a second CallTarget for the same RubyRootNode
1 parent dd0bf5e commit a121d85

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/org/truffleruby/language/loader/RequireNode.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.truffleruby.interop.TranslateInteropExceptionNode;
3131
import org.truffleruby.language.RubyConstant;
3232
import org.truffleruby.language.RubyContextNode;
33-
import org.truffleruby.language.RubyRootNode;
3433
import org.truffleruby.language.WarningNode;
3534
import org.truffleruby.language.constants.GetConstantNode;
3635
import org.truffleruby.language.control.RaiseException;
@@ -234,12 +233,10 @@ private boolean parseAndCall(String feature, String expandedPath) {
234233
getLanguage().parsingRequestParams.set(null);
235234
}
236235

237-
final RubyRootNode rootNode = RubyRootNode.of(rootCallTarget);
238-
239236
final CodeLoader.DeferredCall deferredCall = getContext().getCodeLoader().prepareExecute(
237+
rootCallTarget,
240238
ParserContext.TOP_LEVEL,
241239
DeclarationContext.topLevel(getContext()),
242-
rootNode,
243240
null,
244241
coreLibrary().mainObject);
245242

0 commit comments

Comments
 (0)