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

Commits on Jun 15, 2018

  1. Copy the full SHA
    087707e View commit details
  2. Copy the full SHA
    9062f84 View commit details
  3. Copy the full SHA
    5200a84 View commit details
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyIO.java
Original file line number Diff line number Diff line change
@@ -5014,7 +5014,7 @@ public static IRubyObject popen3(ThreadContext context, IRubyObject recv, IRubyO
final RubyThread[] waitThread = new RubyThread[1];
waitThread[0] = new RubyThread(
runtime,
(RubyClass) runtime.getClassFromPath("Process::WaitThread"),
(RubyClass) runtime.getProcess().getConstantAt("WaitThread"), // Process::WaitThread
new ThreadedRunnable() {

volatile Thread javaThread;
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyThread.java
Original file line number Diff line number Diff line change
@@ -683,7 +683,7 @@ private static RubyThread startThread(final IRubyObject recv, final IRubyObject[
}

protected static RubyThread startWaiterThread(final Ruby runtime, int pid, Block block) {
final IRubyObject waiter = runtime.getClassFromPath("Process::Waiter");
final IRubyObject waiter = runtime.getProcess().getConstantAt("Waiter"); // Process::Waiter
final RubyThread rubyThread = new RubyThread(runtime, (RubyClass) waiter);
rubyThread.op_aset(runtime.newSymbol("pid"), runtime.newFixnum(pid));
rubyThread.callInit(IRubyObject.NULL_ARRAY, block);
Original file line number Diff line number Diff line change
@@ -63,11 +63,11 @@
import org.jruby.javasupport.*;
import org.jruby.runtime.ObjectAllocator;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.util.ByteList;
import org.jruby.util.ClassDefiningClassLoader;

import static org.jruby.javasupport.JavaClass.EMPTY_CLASS_ARRAY;
import static org.jruby.javasupport.JavaCallable.inspectParameterTypes;
import static org.jruby.javasupport.proxy.JavaProxyClassFactory.runtimeTLS;

/**
* Generalized proxy for classes and interfaces.
@@ -87,8 +87,6 @@
*/
public class JavaProxyClass extends JavaProxyReflectionObject {

@Deprecated // moved to JavaProxyClassFactory
static ThreadLocal<Ruby> runtimeTLS = JavaProxyClassFactory.runtimeTLS;

private final Class proxyClass;
private final ArrayList<JavaProxyMethod> methods = new ArrayList<>();
2 changes: 2 additions & 0 deletions core/src/main/ruby/jruby/kernel/process.rb
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ def pid
self[:pid]
end
end
private_constant :WaitThread

class Waiter < Thread
# only created from Java and used for Process.detach right now
@@ -20,4 +21,5 @@ def pid
self[:pid]
end
end
private_constant :Waiter
end
4 changes: 2 additions & 2 deletions spec/java_integration/extensions/collection_spec.rb
Original file line number Diff line number Diff line change
@@ -151,7 +151,7 @@

# immutable and non-Cloneable
arr = Java::java_integration::fixtures::coll::NonCloneableImmutableList.new
expect { arr.dup }.to raise_error # Java::JavaLang::UnsupportedOperationException
expect { arr.dup }.to raise_error(Java::JavaLang::UnsupportedOperationException)

arr = Java::java_integration::fixtures::coll::NonCloneableImmutableList2::INSTANCE
expect { arr.dup }.to raise_error(Java::JavaLang::IllegalStateException) # since 9.2 (swallowed previously)
@@ -188,7 +188,7 @@

# immutable and non-Cloneable
arr = Java::java_integration::fixtures::coll::NonCloneableImmutableList.new
expect { arr.clone }.to raise_error # Java::JavaLang::UnsupportedOperationException
expect { arr.clone }.to raise_error(java.lang.UnsupportedOperationException)
end

it '#include?' do