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
This commit is contained in:
nobu 2016-11-13 05:25:53 +00:00
parent 48d5a921ab
commit d432839cbd
4 changed files with 33 additions and 21 deletions

View file

@ -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