diff options
Diffstat (limited to 'ext/win32ole')
-rw-r--r-- | ext/win32ole/win32ole_variable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/win32ole/win32ole_variable.c b/ext/win32ole/win32ole_variable.c index 57a8115fb5..5a0fd5cf04 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); } |