Skip to content

Commit

Permalink
[Truffle] Windows: File.absolute_path should only have /.
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Feb 18, 2015
1 parent a5ad48a commit 6af6f90
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -47,7 +47,13 @@ public AbsolutePathNode(AbsolutePathNode prev) {
public RubyString absolutePath(RubyString path) {
notDesignedForCompilation();

return getContext().makeString(new File(path.toString()).getAbsolutePath());
String absolute = new File(path.toString()).getAbsolutePath();

if (getContext().isRunningOnWindows()) {
absolute = absolute.replace('\\', '/');
}

return getContext().makeString(absolute);
}

}
Expand Down

0 comments on commit 6af6f90

Please sign in to comment.