1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ko1 2007-06-05 17:55:07 +00:00
parent 5f05c269e9
commit 64ffdb4440
4 changed files with 32 additions and 2 deletions

4
cont.c
View file

@ -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;
}