summaryrefslogtreecommitdiff
path: root/ruby/rand-strings.rb
blob: 6552d0b9c7aefe4659304282513df2f2f16caec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env ruby

s = ""
alphabet = ["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"]
(0).upto(1000) {
  n = Random.rand(10)
  w = alphabet.sample(n).join("")
  s += w+" "
}
puts s