summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-18 04:30:44 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-18 04:30:44 +0000
commit606b66db7dd142884acfdab7a40a29938ea729f1 (patch)
treec613e1fb4ccdb50fc4b00d16b705e713d0fa5cc7 /vm.c
parentec3226d826e9ec7381cdb53a0c45c153065bfdad (diff)
* 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 'vm.c')
-rw-r--r--vm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 2266754..a15bdbb 100644
--- a/vm.c
+++ b/vm.c
@@ -917,6 +917,11 @@ rb_vm_make_jump_tag_but_local_jump(int state, VALUE val)
case TAG_RETRY:
result = make_localjump_error("retry outside of rescue clause", Qnil, state);
break;
+ case TAG_FATAL:
+ /* internal exception or Thread.exit */
+ /* Thread.exit set th->errinfo to INT2FIX(TAG_FATAL) */
+ if (!FIXNUM_P(val))
+ result = val;
default:
break;
}