Project

General

Profile

Bug #12485 » rational.c.diff

mrkn (Kenta Murata), 06/13/2016 02:53 PM

View differences:

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
(1-1/2)