Skip to content

Commit

Permalink
Adjust ridx if mrb_yield terminated by break; fix #3686
Browse files Browse the repository at this point in the history
This issue is related to #3640.
  • Loading branch information
matz committed Jun 2, 2017
1 parent 51e0e69 commit 079f310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 079f310

Please sign in to comment.