summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-18 13:40:41 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-18 13:40:41 +0000
commitd89c7635285b5d0e84400577eedb53349c798f86 (patch)
tree7326bdac60084a073fd363fd982a275bdee63b56 /ext
parentd738e3e15533e0f500789faaedcef9ed9ca362b9 (diff)
* ext/win32ole/win32ole.c (folevariant_initialize): WIN32OLE_VARIANT
does not support VT_RECORD. VT_RECORD should be supported in WIN32OLE_RECORD. * test/win32ole/test_win32ole_variant.rb (test_s_new_vt_record_exc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/win32ole/win32ole.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 59e2fc44f08..55a19d5330d 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -143,7 +143,7 @@ const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00,
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
-#define WIN32OLE_VERSION "1.6.0"
+#define WIN32OLE_VERSION "1.6.1"
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -8892,6 +8892,9 @@ folevariant_initialize(VALUE self, VALUE args)
} else {
vvt = rb_ary_entry(args, 1);
vt = NUM2INT(vvt);
+ if ((vt & VT_TYPEMASK) == VT_RECORD) {
+ rb_raise(rb_eArgError, "not supported VT_RECORD WIN32OLE_VARIANT object");
+ }
ole_val2olevariantdata(val, vt, pvar);
}
return self;