diff options
Diffstat (limited to 'vm_trace.c')
-rw-r--r-- | vm_trace.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vm_trace.c b/vm_trace.c index ad0fce0713..425ca9fae0 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -316,7 +316,12 @@ rb_threadptr_exec_event_hooks_orig(rb_trace_arg_t *trace_arg, int pop_p) th->vm->trace_running--; if (state) { - if (pop_p) th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp); + if (pop_p) { + if (VM_FRAME_TYPE_FINISH_P(th->cfp)) { + th->tag = th->tag->prev; + } + th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp); + } TH_JUMP_TAG(th, state); } th->state = outer_state; |