summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_complex.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-03 16:01:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-03 16:01:16 +0000
commit67524af843198f1bc8cfd718c026fcfc9dce12f9 (patch)
tree5425f2861bd8fed40999a2c21659821f500fc826 /test/ruby/test_complex.rb
parentf167780b24a2bbdaaa6506de43206e55ce360ee2 (diff)
downloadruby-67524af843198f1bc8cfd718c026fcfc9dce12f9.tar.gz
ruby-67524af843198f1bc8cfd718c026fcfc9dce12f9.tar.xz
ruby-67524af843198f1bc8cfd718c026fcfc9dce12f9.zip
* bignum.c (Init_Bignum): rdiv method removed. [ruby-dev:34242]
* complex.c (nucomp_quo): ditto. * numeric.c (num_rdiv): ditto. * rational.c (nurat_div): ditto. * complex.c (nucomp_fdiv): fdiv implementation restored. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_complex.rb')
-rw-r--r--test/ruby/test_complex.rb32
1 files changed, 4 insertions, 28 deletions
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb
index bfa985919..c1a2cfa66 100644
--- a/test/ruby/test_complex.rb
+++ b/test/ruby/test_complex.rb
@@ -413,30 +413,6 @@ class Complex_Test < Test::Unit::TestCase
end
end
- def test_rdiv
- if defined?(Rational) && !Rational.instance_variable_get('@RCS_ID')
- c = Complex(1,2)
- c2 = Complex(2,3)
-
- assert_equal(Complex(Rational(8,13),Rational(1,13)), c.rdiv(c2))
-
- c = Complex(1.0,2.0)
- c2 = Complex(2.0,3.0)
-
- r = c.rdiv(c2)
- assert_in_delta(0.615, r.real, 0.001)
- assert_in_delta(0.076, r.image, 0.001)
-
- c = Complex(1,2)
- c2 = Complex(2,3)
-
- assert_equal(Complex(Rational(1,2),1), c.rdiv(2))
-
- assert_equal(Complex(Rational(1,2),Rational(1)), c / Rational(2))
- assert_equal(Complex(Rational(3,2),Rational(3)), c / Rational(2,3))
- end
- end
-
def test_fdiv
c = Complex(1,2)
c2 = Complex(2,3)
@@ -880,10 +856,10 @@ class Complex_Test < Test::Unit::TestCase
end
if defined?(Rational) && !Rational.instance_variable_get('@RCS_ID')
- assert_equal(Rational(1,2), 1.rdiv(2))
- assert_equal(Rational(5000000000), 10000000000.rdiv(2))
- assert_equal(Rational(1,2), 1.0.rdiv(2))
- assert_equal(Rational(1,4), Rational(1,2).rdiv(2))
+ assert_equal(Rational(1,2), 1.quo(2))
+ assert_equal(Rational(5000000000), 10000000000.quo(2))
+ assert_equal(Rational(1,2), 1.0.quo(2))
+ assert_equal(Rational(1,4), Rational(1,2).quo(2))
assert_equal(Complex(Rational(1,2),Rational(1)), Complex(1,2).quo(2))
end