summaryrefslogtreecommitdiff
path: root/test/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 /test/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 'test/win32ole')
-rw-r--r--test/win32ole/test_win32ole.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb
index d9e5953..9146103 100644
--- a/test/win32ole/test_win32ole.rb
+++ b/test/win32ole/test_win32ole.rb
@@ -119,6 +119,14 @@ if defined?(WIN32OLE)
assert_equal("BAR", @dict1["foo"])
end
+ def test_bracket_with_numkey
+ @dict1.add(1, "ONE")
+ @dict1.add(2, "two")
+ assert_equal("ONE", @dict1[1])
+ @dict1[2] = "TWO"
+ assert_equal("TWO", @dict1[2])
+ end
+
def test_invoke_with_array
@dict1.add("ary1", [1,2,3])
assert_equal([1,2,3], @dict1["ary1"])