summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-22 12:31:27 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-22 12:31:27 +0000
commit537d0cab1dadb52c738d9e688147bb66c88d9164 (patch)
treedfe507a1cc8eeb3dd3f25ce30de7b7f23fe05597 /lib
parent835dcc220e713300c5eb392b08e254ac5ee62974 (diff)
merges r28698 from trunk into ruby_1_9_2.
-- * lib/cmath.rb (CMath#cbrt): cbrt should accept a negative real numbers. [ruby-core:31234] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/cmath.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cmath.rb b/lib/cmath.rb
index b23dac239c..976f269299 100644
--- a/lib/cmath.rb
+++ b/lib/cmath.rb
@@ -85,7 +85,7 @@ module CMath
end
def cbrt(z)
- if z.real? and z >= 0
+ if z.real?
cbrt!(z)
else
Complex(z) ** (1.0/3)