Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> alphanum = (("1".."9").to_a + ("A".."Z").to_a)
- => ["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"]
- >> string = ""
- => ""
- >> 10.times { string += alphanum[rand(35)] }
- => 10
- >> string
- => "3XH74HD4YP"
Add Comment
Please, Sign In to add comment