summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-22 08:03:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-22 08:03:51 +0000
commit22c0397a2071a2032397225b91b27502c09ff1b7 (patch)
tree95107406c25d1ec294023d933f2395e254257b16 /vm_dump.c
parent11650a6ab90f2c6de97840bab4837802c91f7e5e (diff)
* vm_dump.c (rb_vm_bugreport): limit class name length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 0e51315..2ec3615 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -766,8 +766,10 @@ rb_vm_bugreport(void)
LIMITED_NAME_LENGTH(name), RSTRING_PTR(name));
}
else {
- fprintf(stderr, " %4d #<%s:%p>\n", i,
- rb_class2name(CLASS_OF(name)), (void *)name);
+ VALUE klass = rb_class_name(CLASS_OF(name));
+ fprintf(stderr, " %4d #<%.*s:%p>\n", i,
+ LIMITED_NAME_LENGTH(klass), RSTRING_PTR(klass),
+ (void *)name);
}
}
fprintf(stderr, "\n");