summaryrefslogtreecommitdiff
path: root/lib/cmath.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-21 09:14:00 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-21 09:14:00 +0000
commitdb54a65ffc92344b8aee30f4a59d3da37bfccd22 (patch)
treed895f04bbf310c39bf3c334481f1d1197c9e2084 /lib/cmath.rb
parentd22db6cc4e07855a306e9087ef2ddf6dfaa26e35 (diff)
merges r23658 from trunk into ruby_1_9_1.
-- * lib/cmath.rb (log10): raised exception when the given number is a negative real. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cmath.rb')
-rw-r--r--lib/cmath.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cmath.rb b/lib/cmath.rb
index 95a30c336b..1b0c65c995 100644
--- a/lib/cmath.rb
+++ b/lib/cmath.rb
@@ -48,7 +48,7 @@ module CMath
end
def log10(z)
- if z.real?
+ if z.real? and z >= 0
log10!(z)
else
log(z) / log!(10)