aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cmath.rb
diff options
context:
space:
mode:
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 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)