summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-01 14:46:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-01 14:46:07 +0000
commited4f2c0744489f2be58f75f912dcd4fa6b8cb0ca (patch)
tree26c2ecff4ed2b78fd5a63eac3ecc1d9a5a82c59b /test
parent75f42f8d134496760c86ac2af04ab8b4f2feb86a (diff)
downloadruby-ed4f2c0744489f2be58f75f912dcd4fa6b8cb0ca.tar.gz
ruby-ed4f2c0744489f2be58f75f912dcd4fa6b8cb0ca.tar.xz
ruby-ed4f2c0744489f2be58f75f912dcd4fa6b8cb0ca.zip
* array.c (rb_ary_combination): revisit #combination behavior.
suggested by David Flanagan. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_array.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 4d2b05304..9ab3168d7 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1178,7 +1178,7 @@ class TestArray < Test::Unit::TestCase
end
# def test_permutation
-# assert_equal(@cls[], @cls[1,2,3].permutation(0).to_a)
+# assert_equal(@cls[[]], @cls[1,2,3].permutation(0).to_a)
# assert_equal(@cls[[1],[2],[3]], @cls[1,2,3].permutation(1).to_a)
# assert_equal(@cls[[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]], @cls[1,2,3].permutation(2).to_a)
# assert_equal(@cls[[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]], @cls[1,2,3].permutation(3).to_a)
@@ -1186,7 +1186,7 @@ class TestArray < Test::Unit::TestCase
# end
def test_combination
- assert_equal(@cls[], @cls[1,2,3,4].combination(0).to_a)
+ assert_equal(@cls[[]], @cls[1,2,3,4].combination(0).to_a)
assert_equal(@cls[[1],[2],[3],[4]], @cls[1,2,3,4].combination(1).to_a)
assert_equal(@cls[[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]], @cls[1,2,3,4].combination(2).to_a)
assert_equal(@cls[[1,2,3],[1,2,4],[1,3,4],[2,3,4]], @cls[1,2,3,4].combination(3).to_a)