summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-06 13:06:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-06 13:06:51 +0000
commit0363b91bf653453cf8900d66f35747e35ffabc03 (patch)
tree538d96b1a3b1338a5b54117370e093537035d622 /test
parentec440b0b570a10fd90e549af7c318fb4302eb9cc (diff)
* 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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_array.rb5
1 files changed, 5 insertions, 0 deletions
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