diff options
Diffstat (limited to 'test/ruby/test_exception.rb')
-rw-r--r-- | test/ruby/test_exception.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index a868279de8..05c74f6dcd 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -1352,14 +1352,11 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| end def test_circular_cause_handle - errs = [/.*error 1.*\n/, /.*error 2.*\n/, /.*error 1.*/m] - assert_in_out_err([], "#{<<~"begin;"}\n#{<<~'end;'}", [], errs, success: false, timeout: 2) - begin; + assert_raise_with_message(ArgumentError, /circular cause/) do begin raise "error 1" rescue => e1 - raise "error 2" rescue e2 = $! - raise e1, cause: e2 + raise "error 2" rescue raise e1, cause: $! end end; end |