From ca47fb329a1d48af3e1009620bdb18e931c9f188 Mon Sep 17 00:00:00 2001 From: mrkn Date: Wed, 12 Sep 2018 05:52:27 +0000 Subject: Revert "enumerator.c: Fix ArithmeticSequence for complex step" This reverts commit 0a0f8238d02a2dfff4cd2892408e14cb826cec7e. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_arithmetic_sequence.rb | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'test/ruby/test_arithmetic_sequence.rb') diff --git a/test/ruby/test_arithmetic_sequence.rb b/test/ruby/test_arithmetic_sequence.rb index f4f47ea7a8..a9978733fa 100644 --- a/test/ruby/test_arithmetic_sequence.rb +++ b/test/ruby/test_arithmetic_sequence.rb @@ -396,24 +396,4 @@ class TestArithmeticSequence < Test::Unit::TestCase assert_equal(4, (10...2).step(-2).size) assert_equal(Float::INFINITY, (1..).step(-1).size) end - - def assert_num_equal_type(ary1, ary2, message=nil) - assert_equal(ary1.length, ary2.length, message) - ary1.zip(ary2) do |e1, e2| - assert_equal(e1.class, e2.class, message) - if e1.is_a? Complex - assert_equal(e1.real, e2.real, message) - assert_equal(e1.imag, e2.imag, message) - else - assert_equal(e1, e2, message) - end - end - end - - def test_complex - assert_num_equal_type([1, 1+1i, 1+2i], (1..).step(1i).take(3)) - assert_num_equal_type([1, 1+1.0i, 1+2.0i], (1..).step(1.0i).take(3)) - assert_num_equal_type([0.0, 0.0+1.0i, 0.0+2.0i], (0.0..).step(1.0i).take(3)) - assert_num_equal_type([0.0+0.0i, 0.0+1.0i, 0.0+2.0i], (0.0i..).step(1.0i).take(3)) - end end -- cgit v1.2.3