Use RB_INTEGER_TYPE_P
This commit is contained in:
parent
261dca2ee2
commit
bc1323ce5c
3
object.c
3
object.c
@ -3265,8 +3265,7 @@ rb_check_to_integer(VALUE val, const char *method)
|
|||||||
{
|
{
|
||||||
VALUE v;
|
VALUE v;
|
||||||
|
|
||||||
if (FIXNUM_P(val)) return val;
|
if (RB_INTEGER_TYPE_P(val)) return val;
|
||||||
if (RB_TYPE_P(val, T_BIGNUM)) return val;
|
|
||||||
v = convert_type(val, "Integer", method, FALSE);
|
v = convert_type(val, "Integer", method, FALSE);
|
||||||
if (!RB_INTEGER_TYPE_P(v)) {
|
if (!RB_INTEGER_TYPE_P(v)) {
|
||||||
return Qnil;
|
return Qnil;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user