diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-13 05:25:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-13 05:25:53 +0000 |
commit | 7ce6de9328ad72903b1d8222bf838518c587b403 (patch) | |
tree | 82191fc7d8d514e5dd42b4ccc08b8eeb6b21b992 /test/ruby/test_exception.rb | |
parent | 4977d359c20e8d95bd14b6a8993e6c65c2f526e6 (diff) | |
download | ruby-7ce6de9328ad72903b1d8222bf838518c587b403.tar.gz |
error.c: rb_get_backtrace
* error.c (rb_get_backtrace): move from eval_error.c to call
exc_backtrace directly. [ruby-core:78097] [Bug #12925]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 |