summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-30 14:53:14 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-30 14:53:14 +0000
commite613980e8367bf7e14482e4129885027b616bf10 (patch)
tree6bbeffeef247aba32ae718e67184279d11459e9a /lib
parent266755a6ff7b49054ec48f51f3a87e48cd0fc265 (diff)
* lib/cmath.rb (cbrt): should return a real number if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32761 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 14c2a9fce6..d613a3f6f9 100644
--- a/lib/cmath.rb
+++ b/lib/cmath.rb
@@ -147,7 +147,7 @@ module CMath
##
# returns the principal value of the cube root of +z+
def cbrt(z)
- Complex(z) ** (1.0/3)
+ z ** (1.0/3)
end
##