PATH:
opt
/
alt
/
ruby18
/
share
/
ri
/
1.8
/
system
/
Array
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: When invoked with a block, yield all permutations of length <em>n</em> of the elements of <em>ary</em>, then return the array itself. If <em>n</em> is not specified, yield all permutations of all elements. The implementation makes no guarantees about the order in which the permutations are yielded. - !ruby/struct:SM::Flow::P body: When invoked without a block, return an enumerator object instead. - !ruby/struct:SM::Flow::P body: "Examples:" - !ruby/struct:SM::Flow::VERB body: " a = [1, 2, 3]\n a.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]\n a.permutation(1).to_a #=> [[1],[2],[3]]\n a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]\n a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]\n a.permutation(0).to_a #=> [[]] # one permutation of length 0\n a.permutation(4).to_a #=> [] # no permutations of length 4\n" full_name: Array#permutation is_singleton: false name: permutation params: | ary.permutation { |p| block } -> array ary.permutation -> enumerator ary.permutation(n) { |p| block } -> array ary.permutation(n) -> enumerator visibility: public
[-] pack-i.yaml
[edit]
[-] frozen%3f-i.yaml
[edit]
[-] reject-i.yaml
[edit]
[-] drop-i.yaml
[edit]
[-] %3c%3d%3e-i.yaml
[edit]
[-] size-i.yaml
[edit]
[-] compact%21-i.yaml
[edit]
[-] drop_while-i.yaml
[edit]
[-] product-i.yaml
[edit]
[-] concat-i.yaml
[edit]
[-] collect%21-i.yaml
[edit]
[-] pretty_print_cycle-i.yaml
[edit]
[-] flatten%21-i.yaml
[edit]
[-] fetch-i.yaml
[edit]
[-] reverse%21-i.yaml
[edit]
[-] %2a-i.yaml
[edit]
[-] to_ary-i.yaml
[edit]
[-] indices-i.yaml
[edit]
[-] empty%3f-i.yaml
[edit]
[-] to_yaml-i.yaml
[edit]
[-] values_at-i.yaml
[edit]
[-] last-i.yaml
[edit]
[-] hash-i.yaml
[edit]
[-] join-i.yaml
[edit]
[-] pretty_print-i.yaml
[edit]
[-] yaml_initialize-i.yaml
[edit]
[-] %5b%5d%3d-i.yaml
[edit]
[-] assoc-i.yaml
[edit]
[-] find_index-i.yaml
[edit]
[-] shelljoin-i.yaml
[edit]
[-] %2d-i.yaml
[edit]
[-] flatten-i.yaml
[edit]
[-] %3c%3c-i.yaml
[edit]
[-] cdesc-Array.yaml
[edit]
[-] pop-i.yaml
[edit]
[-] transpose-i.yaml
[edit]
[-] take-i.yaml
[edit]
[-] index-i.yaml
[edit]
[-] insert-i.yaml
[edit]
[-] include%3f-i.yaml
[edit]
[-] cycle-i.yaml
[edit]
[-] uniq-i.yaml
[edit]
[-] reverse_each-i.yaml
[edit]
[-] at-i.yaml
[edit]
[-] abbrev-i.yaml
[edit]
[-] initialize_copy-i.yaml
[edit]
[-] compact-i.yaml
[edit]
[-] map-i.yaml
[edit]
[-] %2b-i.yaml
[edit]
[-] inspect-i.yaml
[edit]
[-] choice-i.yaml
[edit]
[-] delete-i.yaml
[edit]
[-] unshift-i.yaml
[edit]
[-] nitems-i.yaml
[edit]
[-] uniq%21-i.yaml
[edit]
[-] combination-i.yaml
[edit]
[-] dclone-i.yaml
[edit]
[-] clear-i.yaml
[edit]
[-] each_index-i.yaml
[edit]
[-] rassoc-i.yaml
[edit]
[-] reject%21-i.yaml
[edit]
[-] push-i.yaml
[edit]
[-] %3d%3d-i.yaml
[edit]
[-] rindex-i.yaml
[edit]
[-] sort%21-i.yaml
[edit]
[-] permutation-i.yaml
[edit]
[-] %5b%5d-c.yaml
[edit]
[-] %5b%5d-i.yaml
[edit]
[-] to_a-i.yaml
[edit]
[-] take_while-i.yaml
[edit]
[-] map%21-i.yaml
[edit]
[-] collect-i.yaml
[edit]
[-] fill-i.yaml
[edit]
[-] eql%3f-i.yaml
[edit]
[-] delete_at-i.yaml
[edit]
[-] length-i.yaml
[edit]
[+]
..
[-] slice-i.yaml
[edit]
[-] delete_if-i.yaml
[edit]
[-] select-i.yaml
[edit]
[-] each-i.yaml
[edit]
[-] indexes-i.yaml
[edit]
[-] sort-i.yaml
[edit]
[-] new-c.yaml
[edit]
[-] shift-i.yaml
[edit]
[-] count-i.yaml
[edit]
[-] %26-i.yaml
[edit]
[-] %7c-i.yaml
[edit]
[-] to_s-i.yaml
[edit]
[-] replace-i.yaml
[edit]
[-] shuffle-i.yaml
[edit]
[-] slice%21-i.yaml
[edit]
[-] first-i.yaml
[edit]
[-] zip-i.yaml
[edit]
[-] shuffle%21-i.yaml
[edit]
[-] reverse-i.yaml
[edit]