End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Numeric#<=>
number <=> other → 0 or nil
numeric.c
View on GitHub ↗
static VALUE
num_cmp(VALUE x, VALUE y)
{
if (x == y) return INT2FIX(0);
return Qnil;
}
Returns zero if number equals other, otherwise returns nil.