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:
parent
261dca2ee2
commit
bc1323ce5c
1 changed files with 1 additions and 2 deletions
3
object.c
3
object.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue