Skip to content

Commit

Permalink
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/language/file_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
windows:The __FILE__ pseudo-variable equals the absolute path of a file loaded by an absolute path
windows:The __FILE__ pseudo-variable equals the absolute path of a file loaded by a relative path
fails:The __FILE__ pseudo-variable equals the absolute path of a file loaded by a relative path
Original file line number Diff line number Diff line change
@@ -196,11 +196,12 @@ public static String expandPath(RubyContext context, String fileName) {

return expanded.asJavaString();
} else {
return expandPath(fileName, null);
String dir = new File(fileName).isAbsolute() ? null : context.getRuntime().getCurrentDirectory();
return expandPath(fileName, dir);
}
}

public static String expandPath(String fileName, String dir) {
private static String expandPath(String fileName, String dir) {
/*
* TODO(cs): this isn't quite correct - I think we want to collapse .., but we don't want to
* resolve symlinks etc. This might be where we want to start borrowing JRuby's

0 comments on commit 8dc8ccc

Please sign in to comment.