From d432839cbdefc792adce02f9ea759bb2bb3249fd Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 13 Nov 2016 05:25:53 +0000 Subject: 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 --- test/ruby/test_exception.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3