End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Rational#negative?
rat.negative? → true or false
rational.c
View on GitHub ↗
static VALUE
nurat_negative_p(VALUE self)
{
get_dat1(self);
return f_boolcast(INT_NEGATIVE_P(dat->num));
}
Returns true if rat is less than 0.