summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-01-28 11:43:01 +0900
committerKoichi Sasada <ko1@atdot.net>2020-01-28 15:23:51 +0900
commit8dbd5c76a0ed26d4adb440fee97c3f25ee6bdcf9 (patch)
tree5928fb93bf70d8fc0d4dd191d23d228f749e3ccb /test/ruby/test_array.rb
parentc9c0ae05937b33bdda43f42f71b99873c9491fa3 (diff)
support multiple run for test/ruby/test_array.
test-all supports multiple run with option --repeat-count=2 but test_equal_resize doesn't support it.
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r--test/ruby/test_array.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index fcfda92487..a66d2301d0 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -2629,18 +2629,17 @@ class TestArray < Test::Unit::TestCase
assert_not_equal([0, 1, 2], [0, 1, 3])
end
- A = Array.new(3, &:to_s)
- B = A.dup
-
def test_equal_resize
+ $test_equal_resize_a = Array.new(3, &:to_s)
+ $test_equal_resize_b = $test_equal_resize_a.dup
o = Object.new
def o.==(o)
- A.clear
- B.clear
+ $test_equal_resize_a.clear
+ $test_equal_resize_b.clear
true
end
- A[1] = o
- assert_equal(A, B)
+ $test_equal_resize_a[1] = o
+ assert_equal($test_equal_resize_a, $test_equal_resize_b)
end
def test_flatten_error