aboutsummaryrefslogtreecommitdiffstats
path: root/ext/win32ole/win32ole.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-14 03:36:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-14 03:36:40 +0000
commit760ae4a8b9fe6844c95cd90254fd6d0f03cf2be7 (patch)
tree254e9da4d239de87285c61e38eb99d86a2d86b14 /ext/win32ole/win32ole.c
parent659f14b254a990cc19667b804f7d1627a927a4f7 (diff)
downloadruby-760ae4a8b9fe6844c95cd90254fd6d0f03cf2be7.tar.gz
win32ole.c: use rb_sym2str
* ext/win32ole/win32ole.c: use rb_sym2str when the result strings will not be modified. * ext/win32ole/win32ole_event.c: ditto. * ext/win32ole/win32ole_record.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/win32ole.c')
-rw-r--r--ext/win32ole/win32ole.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 025a828ec5..2ce8b5a226 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -2513,7 +2513,7 @@ hash2named_arg(VALUE key, VALUE val, VALUE pop)
rb_raise(rb_eTypeError, "wrong argument type (expected String or Symbol)");
}
if (RB_TYPE_P(key, T_SYMBOL)) {
- key = rb_sym_to_s(key);
+ key = rb_sym2str(key);
}
/* pNamedArgs[0] is <method name>, so "index + 1" */
@@ -2580,7 +2580,7 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket)
rb_raise(rb_eTypeError, "method is wrong type (expected String or Symbol)");
}
if (RB_TYPE_P(cmd, T_SYMBOL)) {
- cmd = rb_sym_to_s(cmd);
+ cmd = rb_sym2str(cmd);
}
pole = oledata_get_struct(self);
if(!pole->pDispatch) {
@@ -3577,7 +3577,7 @@ fole_respond_to(VALUE self, VALUE method)
rb_raise(rb_eTypeError, "wrong argument type (expected String or Symbol)");
}
if (RB_TYPE_P(method, T_SYMBOL)) {
- method = rb_sym_to_s(method);
+ method = rb_sym2str(method);
}
pole = oledata_get_struct(self);
wcmdname = ole_vstr2wc(method);