Skip to content

Commit

Permalink
Don't use deprecated Thread.stop anymore. Fixes #3232.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Aug 19, 2015
1 parent 964fbe4 commit 6992f8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/RubyThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.jruby.internal.runtime.RubyRunnable;
import org.jruby.internal.runtime.ThreadLike;
import org.jruby.internal.runtime.ThreadService;
import org.jruby.javasupport.JavaUtil;
import org.jruby.runtime.Block;
import org.jruby.runtime.ObjectAllocator;
import org.jruby.runtime.ThreadContext;
Expand Down Expand Up @@ -1218,7 +1219,7 @@ public void exceptionRaised(Throwable exception) {
Ruby runtime = getRuntime();
if (abortOnException(runtime) && exception instanceof Error) {
// re-propagate on main thread
runtime.getThreadService().getMainThread().getNativeThread().stop(exception);
runtime.getThreadService().getMainThread().raise(JavaUtil.convertJavaToUsableRubyObject(runtime, exception));
} else {
// just rethrow on this thread, let system handlers report it
Helpers.throwException(exception);
Expand Down

0 comments on commit 6992f8e

Please sign in to comment.