Just about to extend the Array class with the following extension:
class Array
def shuffle!
size.downto(1) { |n| push delete_at(rand(n)) }
self
end
end
However, I was wondering where a good place to keep these sort of extensions. I was thinking environment.rb or putting in its own file in the initializers directory.