kernel/common/array.rb
# Reverses the order of elements in self. Returns self
# even if no changes are made
Reverses the order of elements in self. Returns self
even if no changes are made
Reverses the order of elements in self . Returns self even if no changes are made
def reverse!
    return self unless @total > 1
    i = @start
    j = @start + @total - 1
    while(i < (@start+@total/2)) do
      @tuple.swap(i,j)
      i += 1
      j -= 1
    end
    self
  end
def reverse! return self unless @total > 1 i = @start j = @start + @total - 1 while ( i < ( @start + @total / 2 ) ) do @tuple . swap ( i , j ) i += 1 j -= 1 end self end
Reverses the order of elements in self.
Reverses the order of elements in self .