summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-03-15 02:25:46 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2020-03-15 02:25:47 -0700
commitd79890cbfaa32444e3bab60835d7f09abf3d9469 (patch)
tree4b716ad121d908e15e52026a1cb33d74724afcf7
parentf6a54e6e461e3689d0d9068d33f986ce2d458bef (diff)
Avoid doubly showing debug counters
when RubyVM.show_debug_counters is explicitly called. According to the original description in 70fd099220446e39bb80eb0bb32870ce12134619, I think it's not intended to use the exit counter at all, and I'd like to skip it when I need to explicitly call this.
-rw-r--r--debug_counter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_counter.c b/debug_counter.c
index 11ec57a961..af858115d2 100644
--- a/debug_counter.c
+++ b/debug_counter.c
@@ -92,7 +92,8 @@ rb_debug_counter_show_results(const char *msg)
VALUE
rb_debug_counter_show(RB_UNUSED_VAR(VALUE klass))
{
- rb_debug_counter_show_results("method call");
+ rb_debug_counter_show_results("show_debug_counters");
+ ruby_debug_counter_show_at_exit(FALSE);
return Qnil;
}