End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Numeric#arg
num.arg → 0 or float
complex.c
View on GitHub ↗
static VALUE
numeric_arg(VALUE self)
{
if (f_positive_p(self))
return INT2FIX(0);
return DBL2NUM(M_PI);
}
Returns 0 if the value is positive, pi otherwise.