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 | d432839cbdefc792adce02f9ea759bb2bb3249fd (patch) | |
tree | 82191fc7d8d514e5dd42b4ccc08b8eeb6b21b992 /test | |
parent | 48d5a921abbed10b2f003a6c44a681357b179aa2 (diff) | |
download | ruby-d432839cbdefc792adce02f9ea759bb2bb3249fd.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')
-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 |