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

Commits on Nov 25, 2014

  1. Copy the full SHA
    8794c47 View commit details
  2. Copy the full SHA
    d1f4d5b View commit details
Showing with 4 additions and 11 deletions.
  1. +1 −0 .travis.yml
  2. +3 −11 core/src/main/java/org/jruby/runtime/load/ClassExtensionLibrary.java
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@ matrix:
- env: PHASE='-Prake -Dtask=spec:profiler'
- env: PHASE='-Pjruby-jars,test -Dinvoker.test=extended'
- env: PHASE='-Pmain,test -Dinvoker.test=extended'
- env: PHASE='-Pj2ee'

branches:
only:
Original file line number Diff line number Diff line change
@@ -29,8 +29,6 @@

import org.jruby.Ruby;

import java.net.URL;

/**
* The ClassExtensionLibrary wraps a class which implements BasicLibraryService,
* and when asked to load the service, does a basicLoad of the BasicLibraryService.
@@ -64,16 +62,10 @@ static ClassExtensionLibrary tryFind(Ruby runtime, String searchName) {

// We don't want a package name beginning with dots, so we remove them
String className = finName.toString().replaceAll("^\\.*", "");
String classFile = className.replaceAll("\\.", "/") + ".class";

// quietly try to load the class, which must be reachable as a .class resource
URL resource = runtime.getJRubyClassLoader().getResource(classFile);
if (resource != null) {
Class theClass = runtime.getJavaSupport().loadJavaClass(className);
return new ClassExtensionLibrary(className + ".java", theClass);
}

return null;
// quietly try to load the class
Class theClass = runtime.getJavaSupport().loadJavaClass(className);
return new ClassExtensionLibrary(className + ".java", theClass);
} catch (ClassNotFoundException cnfe) {
if (runtime.isDebug()) cnfe.printStackTrace();