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