From 04d62e6f6202684c57f2fcf71bbfcb891cd4ddd9 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Sat, 19 Dec 2020 04:29:58 +0900 Subject: [PATCH] fix method cache debug tool --- vm.c | 1 - vm_method.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/vm.c b/vm.c index c618b796cc..ee28a2d4ad 100644 --- a/vm.c +++ b/vm.c @@ -3595,7 +3595,6 @@ Init_VM(void) rb_define_singleton_method(rb_cRubyVM, "SDR", sdr, 0); rb_define_singleton_method(rb_cRubyVM, "NSDR", nsdr, 0); rb_define_singleton_method(rb_cRubyVM, "mtbl", vm_mtbl, 2); - rb_define_singleton_method(rb_cRubyVM, "mtbl", vm_mtbl, 2); rb_define_singleton_method(rb_cRubyVM, "mtbl2", vm_mtbl2, 2); #else (void)sdr; diff --git a/vm_method.c b/vm_method.c index f1d6c84875..9ee96886d8 100644 --- a/vm_method.c +++ b/vm_method.c @@ -25,12 +25,12 @@ static enum rb_id_table_iterator_result vm_ccs_dump_i(ID mid, VALUE val, void *data) { const struct rb_class_cc_entries *ccs = (struct rb_class_cc_entries *)val; - fprintf(stderr, " | %s (%d) ", rb_id2name(mid), ccs->len); + fprintf(stderr, " | %s (len:%d) ", rb_id2name(mid), ccs->len); rp(ccs->cme); for (int i=0; ilen; i++) { - fprintf(stderr, " | [%d] ", i); vm_ci_dump(ccs->entries[i].ci); - rp_m( " | ", ccs->entries[i].cc); + fprintf(stderr, " | [%d]\t", i); vm_ci_dump(ccs->entries[i].ci); + rp_m( " | \t", ccs->entries[i].cc); } return ID_TABLE_CONTINUE;