Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyKernel.java
Original file line number Diff line number Diff line change
@@ -904,7 +904,7 @@ private static void maybeRaiseJavaException(final Ruby runtime,
if (ex.getCause() == null && cause instanceof ConcreteJavaProxy) {
// allow raise java.lang.RuntimeException.new, cause: myCurrentException()
maybeThrowable = ((ConcreteJavaProxy) cause).getObject();
if (maybeThrowable instanceof Throwable && ex != maybeThrowable) {
if (maybeThrowable instanceof Throwable && ex != maybeThrowable && ex.getCause() == null) {
ex.initCause((Throwable) maybeThrowable);
}
}

0 comments on commit b1c6c38

Please sign in to comment.