Open
Description
Environment
JRuby 9.1.5.0
All platforms
Expected Behavior
def build_exception_with_cause
begin
1 / 0
rescue ZeroDivisionError
1 / 0
end
rescue ZeroDivisionError => exception
return exception
end
exc = build_exception_with_cause
exc.cause # MRI: #<ZeroDivisionError: divided by 0>
Actual Behavior
exc = build_exception_with_cause
exc.cause # JRuby: nil