summaryrefslogtreecommitdiff
path: root/test/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-08 05:06:20 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-08 05:06:20 +0000
commit04976ab678515fa7ee5a95212498acbb287292ba (patch)
treef9280f3d61ba073b4b4a764733b47f382c58ae17 /test/win32ole
parentf41a2574f03bb2ebceca1d17ab40ecba3680a4fb (diff)
* ext/win32ole/win32ole.c (folevariant_initialize): check type of
element of array. * test/win32ole/test_win32ole_variant.rb (test_s_new_ary): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole')
-rw-r--r--test/win32ole/test_win32ole_variant.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/win32ole/test_win32ole_variant.rb b/test/win32ole/test_win32ole_variant.rb
index 26e72ea..8e701ef 100644
--- a/test/win32ole/test_win32ole_variant.rb
+++ b/test/win32ole/test_win32ole_variant.rb
@@ -27,6 +27,14 @@ if defined?(WIN32OLE_VARIANT)
}
end
+ def test_s_new_ary
+ obj = WIN32OLE_VARIANT.new([1])
+ assert_instance_of(WIN32OLE_VARIANT, obj)
+ assert_raise(TypeError) {
+ WIN32OLE_VARIANT.new([/foo/])
+ }
+ end
+
def test_s_new_no_argument
ex = nil
begin