* 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@23943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2009-07-03 07:06:59 +00:00
parent 3948410b04
commit 93c02c4d03
2 changed files with 6 additions and 5 deletions

View file

@ -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