1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use RB_INTEGER_TYPE_P

This commit is contained in:
Nobuyoshi Nakada 2021-07-20 19:21:37 +09:00
parent 261dca2ee2
commit bc1323ce5c
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -3265,8 +3265,7 @@ rb_check_to_integer(VALUE val, const char *method)
{
VALUE v;
if (FIXNUM_P(val)) return val;
if (RB_TYPE_P(val, T_BIGNUM)) return val;
if (RB_INTEGER_TYPE_P(val)) return val;
v = convert_type(val, "Integer", method, FALSE);
if (!RB_INTEGER_TYPE_P(v)) {
return Qnil;