aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cmath.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-23 12:14:43 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-23 12:14:43 +0000
commitf0fa1d7a5a650206daac14f2093fd248d4267f9d (patch)
tree71ad77b655bac98b4a8cbdf50e8d71b153947572 /lib/cmath.rb
parentfe4ceb25b907b5cc5af46cc0d32ca67b10d7d7d5 (diff)
downloadruby-f0fa1d7a5a650206daac14f2093fd248d4267f9d.tar.gz
* lib/cmath.rb: should return a real number if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32643 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 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
##