????JFIF??x?x????'
| Server IP : 104.21.30.238  /  Your IP : 216.73.216.113 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././././proc/thread-self/root/opt/alt/ruby18/share/ri/1.8/system/Array/ | 
| Upload File : | 
--- !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