diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-05 11:44:34 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-05 11:44:34 +0000 |
commit | 5a763bb525d3d0d51e4f2ea0da4a3fa514656a4a (patch) | |
tree | 561b7c3c81a1d0196c3d7eaa65779aaa8e9fbbea /complex.c | |
parent | b35d1e714c1df44b5346e35a6dc519da5e8de4d5 (diff) | |
download | ruby-5a763bb525d3d0d51e4f2ea0da4a3fa514656a4a.tar.gz |
* complex.c (float_arg): returns PI for -0.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); } /* |