End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Float#zero?
float.zero? → true or false
numeric.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/numeric.rb, line 305
def zero?
Primitive.attr! 'inline'
Primitive.cexpr! 'RBOOL(FLOAT_ZERO_P(self))'
end
Returns true if float is 0.0.