diff options
Diffstat (limited to 'vm_trace.c')
-rw-r--r-- | vm_trace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_trace.c b/vm_trace.c index a56261974e..fe10abf50f 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -331,6 +331,7 @@ rb_threadptr_exec_event_hooks_orig(rb_trace_arg_t *trace_arg, int pop_p) trace_arg->self != rb_mRubyVMFrozenCore /* skip special methods. TODO: remove it. */) { const VALUE errinfo = th->errinfo; const int outer_state = th->state; + const VALUE old_recursive = rb_threadptr_reset_recursive_data(th); int state = 0; th->state = 0; th->errinfo = Qnil; @@ -351,6 +352,7 @@ rb_threadptr_exec_event_hooks_orig(rb_trace_arg_t *trace_arg, int pop_p) terminate: th->trace_arg = 0; th->vm->trace_running--; + rb_threadptr_restore_recursive_data(th, old_recursive); if (state) { if (pop_p) { |