From 0363b91bf653453cf8900d66f35747e35ffabc03 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 6 Jun 2010 13:06:51 +0000 Subject: * 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 --- test/ruby/test_array.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 0ee38a2b37..28f9c49d87 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -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 -- cgit v1.2.3