-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
In windows the test testGetCurrentDirectory in ScriptingContainer fails as follows:
org.junit.ComparisonFailure: expected:<C:[\Users\Cris\IdeaProjects\jruby\]core> but was:<C:[/Users/Cris/IdeaProjects/jruby/]core>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at org.jruby.embed.ScriptingContainerTest.testGetCurrentDirectory(ScriptingContainerTest.java:1914)
The bug appears to be here (org.jruby.util.JRubyFile):
public static String normalizeSeps(String path) {
if (Platform.IS_WINDOWS) {
return path.replace(File.separatorChar, '/');
} else {
return path;
}
The order of replace is backwards, changing to:
public static String normalizeSeps(String path) {
if (Platform.IS_WINDOWS) {
return path.replace('/', File.separatorChar);
} else {
return path;
}
}
With your permission my coding partner and I would like to use this simple issue to attempt our first contribution to JRuby. Is there a check in guide we should read?
Thanks,
Cris and Greg
Reactions are currently unavailable