summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_exception.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index 3582cb3de32..88bd095228c 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -1341,6 +1341,15 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
assert_in_out_err([], code, [], /Bug14566/, success: false, timeout: 2)
end
+ def test_non_exception_cause
+ puts "foo"
+ code = "#{<<~"begin;"}\n#{<<~'end;'}"
+ begin;
+ raise "foo", cause: 1
+ end;
+ assert_in_out_err([], code, [], /foo/, success: false, timeout: 2)
+ end
+
def test_super_in_method_missing
assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
begin;