diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-14 05:59:23 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-14 05:59:23 +0000 |
| commit | fb527263c1743804321fc636c0a229efdf441118 (patch) | |
| tree | 438b47a99a569e357944ccbf0cc072b3213cad18 /test/ruby | |
| parent | 7f80e833f34a68deca06d5044dd03315d200b2b9 (diff) | |
| download | ruby-fb527263c1743804321fc636c0a229efdf441118.tar.gz ruby-fb527263c1743804321fc636c0a229efdf441118.tar.xz ruby-fb527263c1743804321fc636c0a229efdf441118.zip | |
* thread.c, vm_eval.c: add Thread.backtrace.
* test/ruby/test_thread.rb: add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_thread.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index b460cadea..d0c35d827 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -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 |
