summaryrefslogtreecommitdiff
path: root/ext/win32ole/win32ole_variable.c
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-11 13:20:11 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-11 13:20:11 +0000
commit812c7a9efa4f1d67459497a506ccf7375bf72cbd (patch)
tree281b2644c2b0f5ed875f5b23f688573b2d65e65b /ext/win32ole/win32ole_variable.c
parent66973fc16b6c3550b4b7c4b432c978675c4213de (diff)
* ext/win32ole/win32ole_variable.c(folevariable_inspect): refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/win32ole_variable.c')
-rw-r--r--ext/win32ole/win32ole_variable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/win32ole/win32ole_variable.c b/ext/win32ole/win32ole_variable.c
index 57a8115..5a0fd5c 100644
--- a/ext/win32ole/win32ole_variable.c
+++ b/ext/win32ole/win32ole_variable.c
@@ -345,9 +345,9 @@ folevariable_varkind(VALUE self)
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);
}