Skip to content

Commit d90b8f2

Browse files
committed
Fix AutoloadNode to use right value in guards
1 parent 7beb202 commit d90b8f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/truffleruby/core/module/ModuleNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,11 @@ protected RubyBaseNodeWithExecute coerceNameToString(RubyBaseNodeWithExecute nam
624624
}
625625

626626
@TruffleBoundary
627-
@Specialization(guards = "libFilename.isRubyString(filename)", limit = "1")
627+
@Specialization(guards = "libFilename.isRubyString(filenameAsPath)", limit = "1")
628628
protected Object autoload(RubyModule module, String name, Object filename,
629629
@Cached ToPathNode toPathNode,
630+
@Bind("toPathNode.execute(filename)") Object filenameAsPath,
630631
@Cached RubyStringLibrary libFilename) {
631-
final var filenameAsPath = toPathNode.execute(filename);
632632
if (!Identifiers.isValidConstantName(name)) {
633633
throw new RaiseException(
634634
getContext(),

0 commit comments

Comments
 (0)