diff options
| author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-31 02:57:18 +0000 |
|---|---|---|
| committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-31 02:57:18 +0000 |
| commit | 31013d0f111084de2a67a05b56967f158c84335c (patch) | |
| tree | a2aa33fa988f12a8ba686b82db1f5da19c0a13e2 /test | |
| parent | 1c8fd014498e827389d034d28af572b74a899686 (diff) | |
* backport r32768 from trunk.
* vm.c: check if cfp is valid. [Bug #5083] [ruby-dev:44208]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_thread.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index daccadde78..c16aa87896 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -604,6 +604,18 @@ class TestThread < Test::Unit::TestCase end INPUT end + + def test_no_valid_cfp + bug5083 = '[ruby-dev:44208]' + error = assert_raise(RuntimeError) do + Thread.new(&Module.method(:nesting)).join + end + assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083) + error = assert_raise(RuntimeError) do + Thread.new(:to_s, &Module.method(:undef_method)).join + end + assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083) + end end class TestThreadGroup < Test::Unit::TestCase |
