summaryrefslogtreecommitdiff
path: root/ext/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-27 14:43:23 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-27 14:43:23 +0000
commitf6f85ad68309508e29f30d6cc4b86d0057aac2c0 (patch)
tree2165d68c0ff2a677a99016f2ddf8905d1472f326 /ext/win32ole
parentad3c6c712b48843bf12cca4bc7d5290f34b0866d (diff)
* ext/win32ole/win32ole.c (ole_invoke): WIN32OLE#[] and WIN32OLE#[]=
accepts number argument. * test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole')
-rw-r--r--ext/win32ole/win32ole.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index bded54f..8b20e62 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -3225,7 +3225,7 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket)
op.dp.cArgs = 0;
rb_scan_args(argc, argv, "1*", &cmd, &paramS);
- if(TYPE(cmd) != T_STRING && TYPE(cmd) != T_SYMBOL) {
+ if(TYPE(cmd) != T_STRING && TYPE(cmd) != T_SYMBOL && !is_bracket) {
rb_raise(rb_eTypeError, "method is wrong type (expected String or Symbol)");
}
if (TYPE(cmd) == T_SYMBOL) {