summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 2da37dc137..56077d83c5 100644
--- a/thread.c
+++ b/thread.c
@@ -4347,6 +4347,7 @@ set_trace_func(VALUE obj, VALUE trace)
rb_remove_event_hook(call_trace_func);
if (NIL_P(trace)) {
+ GET_THREAD()->tracing = EVENT_RUNNING_NOTHING;
return Qnil;
}
@@ -4403,6 +4404,7 @@ thread_set_trace_func_m(VALUE obj, VALUE trace)
rb_threadptr_remove_event_hook(th, call_trace_func);
if (NIL_P(trace)) {
+ th->tracing = EVENT_RUNNING_NOTHING;
return Qnil;
}
thread_add_trace_func(th, trace);