diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-03 05:59:38 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-03 05:59:38 +0000 |
commit | cb5e639da892d78595b00998c24426ecf2670fcf (patch) | |
tree | 5f9133a7277a71ea497ca110de4185d9a9b825d5 /lib | |
parent | 3799f1bbd8986c4e98ec397d2dc7ecfc33f84b98 (diff) |
merge revision(s) 23943:
* lib/complex.rb (Numeric#arg): should return NaN for NaN.
[ruby-core:24116]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@24362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/complex.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/complex.rb b/lib/complex.rb index fbf50ffece..808cecc95d 100644 --- a/lib/complex.rb +++ b/lib/complex.rb @@ -58,11 +58,7 @@ class Numeric # See Complex#arg. # def arg - if self >= 0 - return 0 - else - return Math::PI - end + Math.atan2!(0, self) end alias angle arg |