summaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-05 17:55:07 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-05 17:55:07 +0000
commitf666931378f565da79a39f061458b79380597233 (patch)
tree3bae79f13e9ed13a7c528aacfffb8e4e114d1c32 /cont.c
parent499981cae8701a979bd61780073641354398b03f (diff)
downloadruby-f666931378f565da79a39f061458b79380597233.tar.gz
ruby-f666931378f565da79a39f061458b79380597233.tar.xz
ruby-f666931378f565da79a39f061458b79380597233.zip
* cont.c (rb_fiber_start): clear th->tag and check error to fix
[ruby-dev:30888] and [ruby-dev:30889]. * eval_intern.h: fix rb_fiber_start() prototype. * test/ruby/test_fiber.rb: add tests for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cont.c b/cont.c
index 4327d1474..265e743a9 100644
--- a/cont.c
+++ b/cont.c
@@ -421,6 +421,8 @@ rb_fiber_start(void)
VALUE args;
int state;
+ th->tag = 0;
+
TH_PUSH_TAG(th);
if ((state = EXEC_TAG()) == 0) {
GetContPtr(th->fiber, cont);
@@ -436,7 +438,7 @@ rb_fiber_start(void)
TH_POP_TAG();
if (state) {
- th->thrown_errinfo = th->errinfo;
+ th->thrown_errinfo = th_make_jump_tag_but_local_jump(state, th->errinfo);
th->interrupt_flag = 1;
}