From 38b9c2d3085e6d300ec36b5a38e31f8b4927c4fc Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 31 Dec 2015 21:25:53 +0900 Subject: mruby-fiber: add Fiber.yield description; close #3066 Fiber.yield cannot be called from #initialize which is called by mrb_funcall(). It is mruby limitation. --- mrbgems/mruby-fiber/src/fiber.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mrbgems/mruby-fiber/src/fiber.c b/mrbgems/mruby-fiber/src/fiber.c index c140b6eac..8f0f90c4a 100644 --- a/mrbgems/mruby-fiber/src/fiber.c +++ b/mrbgems/mruby-fiber/src/fiber.c @@ -332,7 +332,9 @@ mrb_fiber_yield(mrb_state *mrb, mrb_int len, const mrb_value *a) * along any arguments that were passed to it. The fiber will resume * processing at this point when resume is called next. * Any arguments passed to the next resume will be the - * value that this Fiber.yield expression evaluates to. + * + * mruby limitation: Fiber resume/yield cannot cross C function boundary. + * thus you cannot yield from #initialize which is called by mrb_funcall(). */ static mrb_value fiber_yield(mrb_state *mrb, mrb_value self) -- cgit v1.2.3