summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-22 08:03:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-22 08:03:53 +0000
commitf02c2b9cfaf426b7d78e68ec5b76e4aba21f8872 (patch)
treeaf9688b7e51fdd539debcd156a064825fcebdb4b
parent22c0397a2071a2032397225b91b27502c09ff1b7 (diff)
downloadruby-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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 2ec3615ce4..b15f17a487 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -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,