From 64ffdb44402f365198ba45c84fa15e449f3411e6 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 5 Jun 2007 17:55:07 +0000 Subject: * 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 --- cont.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cont.c') 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; } -- cgit v1.2.3