Skip to content

Instantly share code, notes, and snippets.

@closer
Created August 26, 2009 02:05
Show Gist options
  • Save closer/175247 to your computer and use it in GitHub Desktop.
Save closer/175247 to your computer and use it in GitHub Desktop.
module Enumerable
def random
ary = self.to_a
ary[rand(ary.size)]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment