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

* test/ruby/test_array.rb (test_product): test for r28187.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-06-06 13:06:51 +00:00
parent ec440b0b57
commit 0363b91bf6

View file

@ -1523,6 +1523,11 @@ class TestArray < Test::Unit::TestCase
assert_equal([[1, 3, 6], [1, 3, 8], [1, 4, 6], [1, 4, 8], [1, 5, 6], [1, 5, 8],
[2, 3, 6], [2, 3, 8], [2, 4, 6], [2, 4, 8], [2, 5, 6], [2, 5, 8]],
acc, bug3394)
def (o = Object.new).to_ary; GC.start; [3,4] end
acc = [1,2].product(*[o]*10)
assert_equal([1,2].product([3,4], [3,4], [3,4], [3,4], [3,4], [3,4], [3,4], [3,4], [3,4], [3,4]),
acc)
end
def test_permutation