Method: CommonLib::Array#swap_indexes!
- Defined in:
- lib/common_lib/ruby/array.rb
#swap_indexes!(i, j) ⇒ Object
Swap the values of an array at the given indexes and return it
70 71 72 73 |
# File 'lib/common_lib/ruby/array.rb', line 70 def swap_indexes!(i,j) self[i],self[j] = self[j],self[i] self end |