# File lib/facet/array/shuffle%21.rb, line 17 def shuffle! s = size each_index do |j| i = Kernel.rand(s-j) #self[j], self[j+i] = self[j+i], self[j] tmp = self[j] self[j] = self[j+i] self[j+i] = tmp end self end