End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Float#hash
float.hash → integer
numeric.c
View on GitHub ↗
static VALUE
flo_hash(VALUE num)
{
return rb_dbl_hash(RFLOAT_VALUE(num));
}
Returns a hash code for this float.
See also Object#hash.