summaryrefslogtreecommitdiff
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
commit64ffdb44402f365198ba45c84fa15e449f3411e6 (patch)
tree3bae79f13e9ed13a7c528aacfffb8e4e114d1c32 /cont.c
parent5f05c269e943b7c633f999b5f046122ba39559fa (diff)
* 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: svn+ssh://ci.ruby-lang.org/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 4327d14746..265e743a97 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;
}