1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* complex.c (nucomp_div): [ruby-dev:34357]

* complex.c (nucomp_abs): use hypot.

	* complex.c (nucomp_quo): do not force convertion.

	* test/ruby/test_complex.rb: omitted some meaningless tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2008-04-14 22:30:45 +00:00
parent fee4ed204f
commit 6d02a4857d
4 changed files with 33 additions and 6 deletions

View file

@ -1055,6 +1055,7 @@ class Complex_Test < Test::Unit::TestCase
Complex.const_set(:Unify, unify_val) if f
end
=begin
def test_abs
b = 2**100
def b.*(x); self; end rescue nil
@ -1075,6 +1076,7 @@ class Complex_Test < Test::Unit::TestCase
nan = inf/inf
assert_raise(Errno::EDOM, Errno::ERANGE) { Complex(1, nan).abs }
end
=end
def test_coerce
c = Complex(6, 3)