summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 2541e2e2e7..24267b033e 100644
--- a/eval.c
+++ b/eval.c
@@ -2772,7 +2772,11 @@ call_trace_func(event, node, self, id, klass)
tracing = 0;
ruby_current_node = node_save;
SET_CURRENT_SOURCE();
- if (state) JUMP_TAG(state);
+ if (state) {
+ trace_func = 0;
+ rb_remove_event_hook(call_trace_func);
+ JUMP_TAG(state);
+ }
}
static VALUE