diff options
Diffstat (limited to 'test/ruby/test_exception.rb')
-rw-r--r-- | test/ruby/test_exception.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 91d3ac1e93..32918df16d 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -952,4 +952,17 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| ::Warning.warn "\x00a\x00b\x00c".force_encoding("utf-16be") end end + + def test_undefined_backtrace + assert_separately([], "#{<<-"begin;"}\n#{<<-"end;"}") + begin; + class Exception + undef backtrace + end + + assert_raise(RuntimeError) { + raise RuntimeError, "hello" + } + end; + end end |