End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Numeric#negative?
negative? → true or false
numeric.c
View on GitHub ↗
static VALUE
num_negative_p(VALUE num)
{
return RBOOL(rb_num_negative_int_p(num));
}
Returns true if self is less than 0, false otherwise.