diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-22 08:03:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-22 08:03:53 +0000 |
commit | f02c2b9cfaf426b7d78e68ec5b76e4aba21f8872 (patch) | |
tree | af9688b7e51fdd539debcd156a064825fcebdb4b | |
parent | 22c0397a2071a2032397225b91b27502c09ff1b7 (diff) | |
download | ruby-f02c2b9cfaf426b7d78e68ec5b76e4aba21f8872.tar.gz |
* vm_dump.c (rb_vm_bugreport): show name of class and module.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | vm_dump.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -765,6 +765,13 @@ rb_vm_bugreport(void) fprintf(stderr, " %4d %.*s\n", i, LIMITED_NAME_LENGTH(name), RSTRING_PTR(name)); } + else if (RB_TYPE_P(name, T_CLASS) || RB_TYPE_P(name, T_MODULE)) { + const char *const type = RB_TYPE_P(name, T_CLASS) ? + "class" : "module"; + name = rb_class_name(name); + fprintf(stderr, " %4d %s:%.*s\n", i, type, + LIMITED_NAME_LENGTH(name), RSTRING_PTR(name)); + } else { VALUE klass = rb_class_name(CLASS_OF(name)); fprintf(stderr, " %4d #<%.*s:%p>\n", i, |