summaryrefslogtreecommitdiff
path: root/ext/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-08 02:37:03 (GMT)
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-08 02:37:03 (GMT)
commit2deefdcd85ef5a75ed794c057d7b35e8e3ca1b3b (patch)
tree7f52309efb23ad112e65b1c3672cb8020cbc0225 /ext/win32ole
parentc539db3e99295aeb57652cdbd39470f1d70a8e27 (diff)
ext/win32ole/win32ole_variant.c (ole_val2variant_err): use FIXNUM_P, RB_TYPE_P
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole')
-rw-r--r--ext/win32ole/win32ole_variant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole_variant.c b/ext/win32ole/win32ole_variant.c
index 3bbf86d..eb0a463 100644
--- a/ext/win32ole/win32ole_variant.c
+++ b/ext/win32ole/win32ole_variant.c
@@ -155,7 +155,7 @@ ole_val2variant_err(VALUE val, VARIANT *var)
if (rb_obj_is_kind_of(v, cWIN32OLE_VARIANT)) {
v = folevariant_value(v);
}
- if (TYPE(v) != T_FIXNUM && TYPE(v) != T_BIGNUM && v != Qnil) {
+ if (!(FIXNUM_P(v) || RB_TYPE_P(v, T_BIGNUM) || v == Qnil)) {
rb_raise(eWIN32OLERuntimeError, "failed to convert VT_ERROR VARIANT:`%"PRIsVALUE"'", rb_inspect(v));
}
V_VT(var) = VT_ERROR;