Skip to content

Instantly share code, notes, and snippets.

@altamic
Created February 18, 2010 16:00
Show Gist options
  • Save altamic/307765 to your computer and use it in GitHub Desktop.
Save altamic/307765 to your computer and use it in GitHub Desktop.
def random_string(length)
(0...length).inject("") { |m,n| m << (?A + rand(25)).chr }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment