summaryrefslogtreecommitdiffstats
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
commitfc9141da860410d646919be167268b20e82c8215 (patch)
tree2165d68c0ff2a677a99016f2ddf8905d1472f326 /test/win32ole
parent7342abffaa7292c719511ee6d619a7c3d475fc35 (diff)
downloadruby-fc9141da860410d646919be167268b20e82c8215.tar.gz
ruby-fc9141da860410d646919be167268b20e82c8215.tar.xz
ruby-fc9141da860410d646919be167268b20e82c8215.zip
* ext/win32ole/win32ole.c (ole_invoke): WIN32OLE#[] and WIN32OLE#[]=
accepts number argument. * test/win32ole/test_win32ole.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/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 d9e595347..914610375 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"])