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

Commits on Feb 17, 2015

  1. always keep uri:classloader://specifications in Gem::Specification.dirs

    to allow required jars which contains embedded gems to be found. basically
    extending existing feature to uri:classloader:/
    mkristian committed Feb 17, 2015
    Copy the full SHA
    928bb84 View commit details
  2. Copy the full SHA
    b88c6c8 View commit details
Showing with 4 additions and 6 deletions.
  1. +1 −5 lib/ruby/stdlib/rubygems/defaults/jruby.rb
  2. +3 −1 maven/jruby/src/it/extended/src/test/java/org/example/SimpleTest.java
6 changes: 1 addition & 5 deletions lib/ruby/stdlib/rubygems/defaults/jruby.rb
Original file line number Diff line number Diff line change
@@ -109,11 +109,7 @@ def spec_directories_from_classpath
# some classloader return directory info. use only the "protocols"
# which jruby understands
stuff.select! { |s| File.directory?( s ) }
if File.directory?( 'uri:classloader://specifications' )
[ 'uri:classloader://specifications' ] + stuff
else
stuff
end
[ 'uri:classloader://specifications' ] + stuff
end
end
end
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@
import java.util.Arrays;
import java.io.File;
import java.io.StringWriter;
import java.net.URL;
import java.net.URLClassLoader;

import org.jruby.embed.LocalContextScope;
import org.jruby.embed.ScriptingContainer;
@@ -69,7 +71,7 @@ private void runIt(String index) throws Exception {
private void runIt(String index, String script) throws Exception {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
//Thread.currentThread().setContextClassLoader();
Thread.currentThread().setContextClassLoader(new URLClassLoader( new URL[] {}, null ));
System.err.println("\n\nrunning --------- " + index + "\n");
ScriptingContainer container = newScriptingContainer();
if (script != null) container.runScriptlet( script );