End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
BigDecimal#infinite?
infinite?
ext/bigdecimal/bigdecimal.c
View on GitHub ↗
static VALUE
BigDecimal_IsInfinite(VALUE self)
{
Real *p = GetVpValue(self, 1);
if (VpIsPosInf(p)) return INT2FIX(1);
if (VpIsNegInf(p)) return INT2FIX(-1);
return Qnil;
}
Returns nil, -1, or +1 depending on whether the value is finite, -Infinity, or +Infinity.