On Mon, May 26, 2008 at 11:34 AM, Boris Schmid <boris / bagofsouls.com> wrote: > >> But what's wrong with the first - it looks fairly compact to me: >> >> string = "" ; 100.times { string << (rand(26) + 97).chr} >> > > For strings I'll have to use the one above, but arrays now read a bit > more natural (to my eyes). The size doesn't matter that much, but it is > simpler to understand. You could also do Array.new(100) { 97 + rand(26) }.pack("c*") Peter