diff options
| -rw-r--r-- | ext/objspace/objspace_dump.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c index 96bd521c79..b77e057498 100644 --- a/ext/objspace/objspace_dump.c +++ b/ext/objspace/objspace_dump.c @@ -449,19 +449,19 @@ dump_object(VALUE obj, struct dump_config *dc) } break; - case imemo_callcache: - mid = vm_cc_cme((const struct rb_callcache *)obj)->called_id; - if (mid != 0) { - dump_append(dc, ", \"called_id\":"); - dump_append_id(dc, mid); - - VALUE klass = ((const struct rb_callcache *)obj)->klass; - if (klass != 0) { - dump_append(dc, ", \"receiver_class\":"); - dump_append_ref(dc, klass); + case imemo_callcache: { + VALUE klass = ((const struct rb_callcache *)obj)->klass; + if (klass) { + mid = vm_cc_cme((const struct rb_callcache *)obj)->called_id; + if (mid != 0) { + dump_append(dc, ", \"called_id\":"); + dump_append_id(dc, mid); } + dump_append(dc, ", \"receiver_class\":"); + dump_append_ref(dc, klass); } break; + } default: break; |
