Skip to content

Instantly share code, notes, and snippets.

@eltiare
Created January 20, 2009 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save eltiare/49680 to your computer and use it in GitHub Desktop.
Save eltiare/49680 to your computer and use it in GitHub Desktop.
Random charactar generator for Ruby
chars = ('A'..'Z').to_a + ('a'..'z').to_a + ('0'..'9').to_a
str = (1..50).map { chars[rand(chars.size)] }.join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment