summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-12 00:42:26 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-12 00:42:26 +0000
commita52c63e420c6e30688f00790d39bb1f720b7be80 (patch)
treed84d5b388a6c80640909d906b2ab8b43ac0d91fa /vm_dump.c
parent0314f93ef402083ea5fd7cb2015f7a98cd0a3358 (diff)
Experimental fix for r38041
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/vm_dump.c b/vm_dump.c
index d9f079a..6e4450c 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -675,14 +675,15 @@ rb_vm_bugreport(void)
if (vm) {
int i;
VALUE name;
- long len;
- const int max_name_length = 1024;
-# define LIMITED_NAME_LENGTH(s) \
- (((len = RSTRING_LEN(s)) > max_name_length) ? max_name_length : (int)len)
name = vm->progname;
- fprintf(stderr, "* Loaded script: %s\n",
- RSTRING_PTR(name));
+ if (RB_TYPE_P(name, T_STRING)) {
+ fprintf(stderr, "* Loaded script: %s\n", RSTRING_PTR(name));
+ }
+ else {
+ fprintf(stderr, "* Loaded script: #<%s:%p>\n",
+ rb_class2name(CLASS_OF(name)), (void *)name);
+ }
fprintf(stderr, "\n");
fprintf(stderr, "* Loaded features:\n\n");
for (i=0; i<RARRAY_LEN(vm->loaded_features); i++) {