Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f417f92f0b23
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 61ba53c2c0ba
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on May 22, 2015

  1. This is a fix for bug ID 2964. The URL to see the write up is here:

    #2964
    
    On windows the mvn -Ptest fails due to incorrect substitution of '/' and '\'.
    
     See the write up for more details.
    
     Cris Shupp
     Greg Bowman
    cngshow committed May 22, 2015
    Copy the full SHA
    6556c49 View commit details

Commits on Jul 7, 2015

  1. Merge pull request #2973 from gpbowman-git/master

    This is a fix for bug ID 2964.  The URL to see the write up is here:
    headius committed Jul 7, 2015
    Copy the full SHA
    61ba53c View commit details
Showing with 6 additions and 5 deletions.
  1. +1 −1 core/src/main/java/org/jruby/util/JRubyFile.java
  2. +5 −4 core/src/test/java/org/jruby/test/TestKernel.java
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/JRubyFile.java
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ private static FileResource createResource(Ruby runtime, String cwd, String path

public static String normalizeSeps(String path) {
if (Platform.IS_WINDOWS) {
return path.replace(File.separatorChar, '/');
return path.replace('/', File.separatorChar);
} else {
return path;
}
9 changes: 5 additions & 4 deletions core/src/test/java/org/jruby/test/TestKernel.java
Original file line number Diff line number Diff line change
@@ -31,8 +31,7 @@
***** END LICENSE BLOCK *****/
package org.jruby.test;

import java.util.ArrayList;

import java.io.File;
import org.jruby.Ruby;
import org.jruby.RubyException;
import org.jruby.RubyFixnum;
@@ -61,15 +60,17 @@ public void testLoad() throws Exception {
assertEquals("load did not load the same file several times", "1", eval("load '../test/loadTest.rb'"));
}


public void testRequire() throws Exception {
char s = File.separatorChar;
//reset the $loadTestvar
eval("$loadTest = nil");
assertEquals("failed to load the file test/loadTest", "0", eval("require '../test/loadTest'"));
assertEquals("incorrectly reloaded the file test/loadTest", "", eval("require '../test/loadTest'"));

assertEquals("incorrect value for $\" variable", "true", eval("print $\"[-1].end_with?('test/loadTest.rb')"));
assertEquals("incorrect value for $\" variable", "true", eval("print $\"[-1].end_with?('test" + s + "loadTest.rb')"));
}


public void testPrintf() throws Exception {
assertEquals("hello", eval("printf(\"%s\", \"hello\")"));
assertEquals("", eval("printf(\"%s\", nil)"));