[前][次][番号順一覧][スレッド一覧]

ruby-changes:28838

From: nobu <ko1@a...>
Date: Wed, 22 May 2013 17:04:01 +0900 (JST)
Subject: [ruby-changes:28838] nobu:r40890 (trunk): * vm_dump.c (rb_vm_bugreport): limit class name length.

nobu	2013-05-22 17:03:51 +0900 (Wed, 22 May 2013)

  New Revision: 40890

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40890

  Log:
    * vm_dump.c (rb_vm_bugreport): limit class name length.

  Modified files:
    trunk/vm_dump.c

Index: vm_dump.c
===================================================================
--- vm_dump.c	(revision 40889)
+++ vm_dump.c	(revision 40890)
@@ -766,8 +766,10 @@ rb_vm_bugreport(void) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L766
 			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");

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]