1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* thread.c, vm_eval.c: add Thread.backtrace.

* test/ruby/test_thread.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2009-06-14 05:59:23 +00:00
parent d3027870ee
commit 63bd8a74e8
4 changed files with 44 additions and 0 deletions

View file

@ -516,4 +516,14 @@ class TestThreadGroup < Test::Unit::TestCase
c.class_eval { def initialize; end }
assert_raise(ThreadError) { c.new.start }
end
def test_backtrace
Thread.new{
assert_equal(Array, Thread.main.backtrace.class)
}.join
t = Thread.new{}
t.join
assert_equal(nil, t.backtrace)
end
end