Skip to content

Commit 4a16e28

Browse files
committed
JRuby doesnt like ZeroDivisionError as a cause I guess
1 parent 896321b commit 4a16e28

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

spec/spec_helper.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ def build_exception
1616

1717
def build_exception_with_cause
1818
begin
19-
1 / 0
20-
rescue ZeroDivisionError
21-
1 / 0
19+
raise "exception a"
20+
rescue
21+
raise "exception b"
2222
end
23-
rescue ZeroDivisionError => exception
23+
rescue RuntimeError => exception
2424
return exception
2525
end
2626

2727
def build_exception_with_two_causes
2828
begin
2929
begin
30-
1 / 0
31-
rescue ZeroDivisionError
32-
1 / 0
30+
raise "exception a"
31+
rescue
32+
raise "exception b"
3333
end
34-
rescue ZeroDivisionError
35-
1 / 0
34+
rescue
35+
raise "exception c"
3636
end
37-
rescue ZeroDivisionError => exception
37+
rescue RuntimeError => exception
3838
return exception
3939
end
4040

0 commit comments

Comments
 (0)