Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Numeric#zero?
() -> bool
zero? → true or false
numeric.c
View on GitHub ↗
static VALUE
num_zero_p(VALUE num)
{
return rb_equal(num, INT2FIX(0));
}