ruby-changes:28839
From: nobu <ko1@a...>
Date: Wed, 22 May 2013 17:04:08 +0900 (JST)
Subject: [ruby-changes:28839] nobu:r40891 (trunk): * vm_dump.c (rb_vm_bugreport): show name of class and module.
nobu 2013-05-22 17:03:53 +0900 (Wed, 22 May 2013) New Revision: 40891 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40891 Log: * vm_dump.c (rb_vm_bugreport): show name of class and module. Modified files: trunk/vm_dump.c Index: vm_dump.c =================================================================== --- vm_dump.c (revision 40890) +++ vm_dump.c (revision 40891) @@ -765,6 +765,13 @@ rb_vm_bugreport(void) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L765 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, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/