Adjust ridx if `mrb_yield` terminated by `break`; fix #3686

This issue is related to #3640.
parent 51e0e690
......@@ -283,8 +283,8 @@ cipop(mrb_state *mrb)
struct mrb_context *c = mrb->c;
struct REnv *env = c->ci->env;
c->ridx = c->ci->rpos;
c->ci--;
if (env) {
mrb_env_unshare(mrb, env);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment