summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/complex.c b/complex.c
index 048aa92bfd..d64c628128 100644
--- a/complex.c
+++ b/complex.c
@@ -1756,7 +1756,9 @@ float_arg(VALUE self)
{
if (isnan(RFLOAT_VALUE(self)))
return self;
- return rb_call_super(0, 0);
+ if (f_tpositive_p(self))
+ return INT2FIX(0);
+ return rb_const_get(rb_mMath, id_PI);
}
/*