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: 6016c39d5768
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c60c87af73c3
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 10, 2015

  1. since "." is on the classpath the executables in ./bin should be trea…

    …ted as files
    
    jruby always looks on classpath in 'bin' for executables but finding
    it there leads to uri:classloader:/bin/rails which can have side effects.
    looking first on the filesystem ./bin will find bin/rails instead.
    
    fixes #3233 and partially #3216
    
    Sponsored by Lookout Inc.
    mkristian committed Aug 10, 2015
    2
    Copy the full SHA
    d4dd056 View commit details
  2. Copy the full SHA
    c60c87a View commit details
4 changes: 4 additions & 0 deletions core/src/main/java/org/jruby/util/cli/ArgumentProcessor.java
Original file line number Diff line number Diff line change
@@ -559,6 +559,10 @@ private String resolveScript(String scriptName) {
if (result != null) return scriptName;// use relative filename
result = resolve(config.getJRubyHome() + "/bin", scriptName);
if (result != null) return result;
// since the current directory is also on the classpath we
// want to find it on filesystem first
result = resolve(config.getCurrentDirectory() + "/bin", scriptName);
if (result != null) return result;
result = resolve("uri:classloader:/bin", scriptName);
if (result != null) return result;

20 changes: 20 additions & 0 deletions maven/jruby-complete/src/it/integrity/pom.xml
Original file line number Diff line number Diff line change
@@ -178,6 +178,26 @@
</arguments>
</configuration>
</execution>
<execution>
<id>-S me - GH-3233</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<workingDirectory>${basedir}</workingDirectory>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<argument>.</argument>
<argument>-classpath</argument>
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-S</argument>
<argument>me</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
5 changes: 5 additions & 0 deletions maven/jruby-complete/src/it/integrity/verify.bsh
Original file line number Diff line number Diff line change
@@ -48,3 +48,8 @@ if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
expected = basedir + "/bin/me";
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}