End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Numeric#<=>
self <=> other → zero 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 self is the same as other, nil otherwise.
No subclass in the Ruby Core or Standard Library uses this implementation.