Permalink
Browse files

Fiber#yield should check C function boundary; fix #3582

  • Loading branch information...
matz committed Apr 10, 2017
1 parent 9094415 commit 03c849338f5fb0efd91b2071f4cedf92bb7bcd55
Showing with 1 addition and 0 deletions.
  1. +1 −0 mrbgems/mruby-fiber/src/fiber.c
@@ -326,6 +326,7 @@ mrb_fiber_yield(mrb_state *mrb, mrb_int len, const mrb_value *a)
mrb_raise(mrb, E_FIBER_ERROR, "can't yield from root fiber");
}
fiber_check_cfunc(mrb, c);
c->prev->status = MRB_FIBER_RUNNING;
c->status = MRB_FIBER_SUSPENDED;
mrb->c = c->prev;

0 comments on commit 03c8493

Please sign in to comment.