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