Skip to content

Commit

Permalink
[Truffle] Fix loading corelibs on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Dec 31, 2014
1 parent 0820935 commit d3e8328
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -123,8 +123,10 @@ public boolean requireInPath(String path, String feature, RubyNode currentNode)
}

private boolean requireFile(String fileName, RubyNode currentNode) throws IOException {
// Loading from core:/ always just goes ahead without a proper check
// We expect '/' in various classpath URLs, so normalize Windows file paths to use '/'.
fileName = fileName.replace('\\', '/');

// Loading from core:/ always just goes ahead without a proper check
if (fileName.startsWith("core:/")) {
try {
context.getCoreLibrary().loadRubyCore(fileName.substring("core:/".length()));
Expand Down

0 comments on commit d3e8328

Please sign in to comment.