Skip to content

Commit 71fbf42

Browse files
authored
Merge pull request jruby#9334 from kares/exception-dup-10
[fix] Exception#dup: copy cause to the duplicated exception
2 parents 83dc1e7 + 136b47d commit 71fbf42

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

core/src/main/java/org/jruby/RubyException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ public void copySpecialInstanceVariables(IRubyObject clone) {
555555
RubyException exception = (RubyException)clone;
556556
exception.backtrace.copy(backtrace);
557557
exception.message = message;
558+
exception.cause = cause;
558559
}
559560

560561
/**

spec/tags/ruby/core/exception/dup_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)