ruby-changes:46163
From: suke <ko1@a...>
Date: Sat, 8 Apr 2017 11:37:08 +0900 (JST)
Subject: [ruby-changes:46163] suke:r58276 (trunk): ext/win32ole/win32ole_variant.c (ole_val2variant_err): use FIXNUM_P, RB_TYPE_P
suke 2017-04-08 11:37:03 +0900 (Sat, 08 Apr 2017) New Revision: 58276 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58276 Log: ext/win32ole/win32ole_variant.c (ole_val2variant_err): use FIXNUM_P, RB_TYPE_P Modified files: trunk/ext/win32ole/win32ole_variant.c Index: ext/win32ole/win32ole_variant.c =================================================================== --- ext/win32ole/win32ole_variant.c (revision 58275) +++ ext/win32ole/win32ole_variant.c (revision 58276) @@ -155,7 +155,7 @@ ole_val2variant_err(VALUE val, VARIANT * https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole_variant.c#L155 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/