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