ruby-changes:54213
From: ko1 <ko1@a...>
Date: Tue, 18 Dec 2018 17:11:56 +0900 (JST)
Subject: [ruby-changes:54213] ko1:r66434 (trunk): rb_raw_obj_info() support T_MODULE and T_ICLASS.
ko1 2018-12-18 17:11:52 +0900 (Tue, 18 Dec 2018) New Revision: 66434 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66434 Log: rb_raw_obj_info() support T_MODULE and T_ICLASS. Modified files: trunk/gc.c Index: gc.c =================================================================== --- gc.c (revision 66433) +++ gc.c (revision 66434) @@ -9715,13 +9715,23 @@ rb_raw_obj_info(char *buff, const int bu https://github.com/ruby/ruby/blob/trunk/gc.c#L9715 (int)RHASH_SIZE(obj)); break; } - case T_CLASS: { - VALUE class_path = rb_class_path_cached(obj); - if (!NIL_P(class_path)) { - snprintf(buff, buff_size, "%s %s", buff, RSTRING_PTR(class_path)); - } - break; - } + case T_CLASS: + case T_MODULE: + { + VALUE class_path = rb_class_path_cached(obj); + if (!NIL_P(class_path)) { + snprintf(buff, buff_size, "%s %s", buff, RSTRING_PTR(class_path)); + } + break; + } + case T_ICLASS: + { + VALUE class_path = rb_class_path_cached(RBASIC_CLASS(obj)); + if (!NIL_P(class_path)) { + snprintf(buff, buff_size, "%s src:%s", buff, RSTRING_PTR(class_path)); + } + break; + } case T_OBJECT: { uint32_t len = ROBJECT_NUMIV(obj); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/