ruby-changes:35055
From: suke <ko1@a...>
Date: Mon, 11 Aug 2014 22:20:17 +0900 (JST)
Subject: [ruby-changes:35055] suke:r47137 (trunk): * ext/win32ole/win32ole_variable.c(folevariable_inspect): refactoring.
suke 2014-08-11 22:20:11 +0900 (Mon, 11 Aug 2014) New Revision: 47137 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47137 Log: * ext/win32ole/win32ole_variable.c(folevariable_inspect): refactoring. Modified files: trunk/ChangeLog trunk/ext/win32ole/win32ole_variable.c Index: ChangeLog =================================================================== --- ChangeLog (revision 47136) +++ ChangeLog (revision 47137) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Aug 11 22:19:15 2014 Masaki Suketa <masaki.suketa@n...> + + * ext/win32ole/win32ole_variable.c(folevariable_inspect): refactoring. + Mon Aug 11 20:47:27 2014 Masaki Suketa <masaki.suketa@n...> * ext/win32ole/win32ole.c: seperate WIN32OLE_VARIABLE src from Index: ext/win32ole/win32ole_variable.c =================================================================== --- ext/win32ole/win32ole_variable.c (revision 47136) +++ ext/win32ole/win32ole_variable.c (revision 47137) @@ -345,9 +345,9 @@ folevariable_varkind(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole_variable.c#L345 static VALUE folevariable_inspect(VALUE self) { - VALUE detail = rb_funcall(self, rb_intern("to_s"), 0); - rb_str_cat2(detail, "="); - rb_str_concat(detail, rb_funcall(rb_funcall(self, rb_intern("value"), 0), rb_intern("inspect"), 0)); + VALUE v = rb_funcall(folevariable_value(self), rb_intern("inspect"), 0); + VALUE n = folevariable_name(self); + VALUE detail = rb_sprintf("%s=%s", StringValueCStr(n), StringValueCStr(v)); return make_inspect("WIN32OLE_VARIABLE", detail); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/