Sha256: 1771bb9aace7a460162ad75f6b7d2f2d281cda05adedd07051edab3ffb6028db
Contents?: true
Size: 305 Bytes
Versions: 14
Compression:
Stored size: 305 Bytes
Contents
require 'facets/array/permutation' require 'test/unit' require 'set' class TestEnumerablePermutation < Test::Unit::TestCase def test_permutation o = Set.new %w[a b c].permutation{ |x| o << x.join('') } r = Set.new(['abc','acb','bac','bca','cab','cba']) assert_equal( r, o ) end end
Version data entries
14 entries across 14 versions & 1 rubygems