Bug #12485 » rational.c.diff
| rational.c | ||
|---|---|---|
|
}
|
||
|
#endif
|
||
|
inline static void
|
||
|
inline static VALUE
|
||
|
nurat_int_check(VALUE num)
|
||
|
{
|
||
|
if (!(RB_TYPE_P(num, T_FIXNUM) || RB_TYPE_P(num, T_BIGNUM))) {
|
||
|
if (!k_numeric_p(num) || !f_integer_p(num))
|
||
|
rb_raise(rb_eTypeError, "not an integer");
|
||
|
}
|
||
|
if (RB_TYPE_P(num, T_FIXNUM) || RB_TYPE_P(num, T_BIGNUM))
|
||
|
return num;
|
||
|
return rb_to_int(num);
|
||
|
}
|
||
|
inline static VALUE
|
||