summaryrefslogtreecommitdiffstats
path: root/lib/complex.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-30 06:12:29 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-30 06:12:29 +0000
commit0390fc54a4924aa219eaec2be981ef05acd60be7 (patch)
tree3bedb874808188b29de760c9dcc1baa80542b85e /lib/complex.rb
parent76cae3b05f8fd67cb98416fa210e137d0c223ea1 (diff)
downloadruby-0390fc54a4924aa219eaec2be981ef05acd60be7.tar.gz
ruby-0390fc54a4924aa219eaec2be981ef05acd60be7.tar.xz
ruby-0390fc54a4924aa219eaec2be981ef05acd60be7.zip
* range.c (range_step): iteration done using "+" if elements are
Numeric. Otherwise using "succ". * range.c (range_each): iteration done using "succ". If the elements does not respond to "succ", raise TypeError. As a result, all Enumerable methods, e.g. collect, require elements to respond to "succ'. * range.c (range_member): comparison done using "each", if elements are non-Numeric or no-"succ" objects. Otherwise compare using "<=>". * range.c (Init_Range): remove "size" and "length". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/complex.rb')
-rw-r--r--lib/complex.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/complex.rb b/lib/complex.rb
index 2de179128..c27746a82 100644
--- a/lib/complex.rb
+++ b/lib/complex.rb
@@ -363,9 +363,10 @@ module Math
alias sin! sin
alias tan! tan
alias log! log
+ alias atan! atan
alias log10! log10
alias atan2! atan2
-
+
def sqrt(z)
if Complex.generic?(z)
if z >= 0