[1,2,3].permutation(2).to_a が [[2, 2], [2, 3]] になります。 % ./ruby -ve 'p [1,2,3].permutation(2).to_a' ruby 1.9.0 (2007-10-09 patchlevel 0) [i686-linux] [[2, 2], [2, 3]] % ./ruby test/ruby/test_array.rb Loaded suite test/ruby/test_array Started ....................................................F.......................... Finished in 0.065778 seconds. 1) Failure: test_permutation(TestArray) [test/ruby/test_array.rb:1205]: <[[1, 2], [1, 3], [2, 1], [2, 3], [3, 1], [3, 2]]> expected but was <[[2, 2], [2, 3]]>. 79 tests, 566 assertions, 1 failures, 0 errors -- [田中 哲][たなか あきら][Tanaka Akira]