On 30.06.2009 22:20, Lloyd Linklater wrote: > All very groovy stuff! The final version I think I shall use is a bit > of an amalgam of your input. > > def randString(len) > s = "" > 1.upto(len) { s << rand(36).to_s(36) } I'd prefer len.times but this is just cosmetic. > s.upcase You can probably squeeze out a bit performance especially for large strings by replacing this with "s.upcase!; s". > end > > At one point I had "unless len < 1" but this functions the same way. > > Thanks again, everyone! You're welcome! Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/