diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-18 04:30:44 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-18 04:30:44 +0000 |
commit | 606b66db7dd142884acfdab7a40a29938ea729f1 (patch) | |
tree | c613e1fb4ccdb50fc4b00d16b705e713d0fa5cc7 /test | |
parent | ec3226d826e9ec7381cdb53a0c45c153065bfdad (diff) | |
download | ruby-606b66db7dd142884acfdab7a40a29938ea729f1.tar.gz |
* vm.c (rb_vm_make_jump_tag_but_local_jump): take care of the case
TAG_JUMP() with TAG_FATAL (ex. rb_fatal()).
* test/ruby/test_fiber.rb (test_fatal_in_fiber): add a test for above.
* ext/-test-/fatal/extconf.rb, ext/-test-/fatal/rb_fatal.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_fiber.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index 7f15e74118..ac2805920e 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -269,5 +269,14 @@ class TestFiber < Test::Unit::TestCase Thread.new{ Fiber.new{ Thread.exit }.resume }.join end end + + def test_fatal_in_fiber + assert_in_out_err(["-r-test-/fatal/rb_fatal", "-e", <<-EOS], "", [], /ok/) + Fiber.new{ + rb_fatal "ok" + }.resume + puts :ng # unreachable. + EOS + end end |