From 7450a774a5f796f7e9d312ba9c9690097f4aa309 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 23 Sep 2017 10:12:04 +0900 Subject: The first instruction was skipped mistakenly in ensure clause; fix #3811 --- src/vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vm.c b/src/vm.c index 3c74f265c..2b0922cd9 100644 --- a/src/vm.c +++ b/src/vm.c @@ -1329,6 +1329,7 @@ RETRY_TRY_BLOCK: if (a > mrb->c->eidx - epos) a = mrb->c->eidx - epos; + pc = pc + 1; for (n=0; nc->ensure[epos+n]; irep = proc->body.irep; @@ -1339,7 +1340,7 @@ RETRY_TRY_BLOCK: ci->stackent = mrb->c->stack; ci->nregs = irep->nregs; ci->target_class = proc->target_class; - ci->pc = pc + 1; + ci->pc = pc; ci->acc = ci[-1].nregs; mrb->c->stack += ci->acc; stack_extend(mrb, ci->nregs); -- cgit v1.2.3