Skip to content

Commit 87c650d

Browse files
committed
Use the TruffleFile to get the absolute path for consistency in MainLoader
1 parent 61f0f80 commit 87c650d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
package org.truffleruby.language.loader;
1111

1212
import java.io.ByteArrayOutputStream;
13-
import java.io.File;
1413
import java.io.IOException;
1514

1615
import org.jcodings.specific.UTF8Encoding;
@@ -97,7 +96,7 @@ public RubySource loadFromFile(Env env, RubyNode currentNode, String path) throw
9796
final Rope sourceRope = transformScript(currentNode, path, sourceBytes);
9897

9998
final Source source = fileLoader.buildSource(file, path, sourceRope, false);
100-
context.setMainSource(source, new File(path).getAbsolutePath());
99+
context.setMainSource(source, file.getAbsoluteFile().getPath());
101100

102101
return new RubySource(source, sourceRope);
103102
}

0 commit comments

Comments
 (0)