Guest User

Untitled

a guest
Feb 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. >> alphanum = (("1".."9").to_a + ("A".."Z").to_a)
  2. => ["1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
  3. >> string = ""
  4. => ""
  5. >> 10.times { string += alphanum[rand(35)] }
  6. => 10
  7. >> string
  8. => "3XH74HD4YP"
Add Comment
Please, Sign In to add comment