ruby-changes:35156
From: nobu <ko1@a...>
Date: Thu, 21 Aug 2014 13:39:42 +0900 (JST)
Subject: [ruby-changes:35156] nobu:r47238 (trunk): struct.c: no rb_class_real twice
nobu 2014-08-21 13:39:28 +0900 (Thu, 21 Aug 2014) New Revision: 47238 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47238 Log: struct.c: no rb_class_real twice * struct.c (inspect_struct): as rb_obj_class() returns real class name, so rb_class_name is not needed. Modified files: trunk/struct.c Index: struct.c =================================================================== --- struct.c (revision 47237) +++ struct.c (revision 47238) @@ -601,7 +601,7 @@ rb_struct_each_pair(VALUE s) https://github.com/ruby/ruby/blob/trunk/struct.c#L601 static VALUE inspect_struct(VALUE s, VALUE dummy, int recur) { - VALUE cname = rb_class_name(rb_obj_class(s)); + VALUE cname = rb_class_path(rb_obj_class(s)); VALUE members, str = rb_str_new2("#<struct "); long i, len; char first = RSTRING_PTR(cname)[0]; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/