From: "Peña, Botp" Date: 2007-08-16T09:34:02+09:00 Subject: Re: Random case chars? From: Xavier Noria [mailto:fxn@hashref.com] # "foobar".gsub(/./) do |c| # c.send([:downcase, :upcase][rand(2)]) # end cool. also, irb(main):125:0> "hello".gsub(/./){|c| rand(2)>0 ? c : c.swapcase } => "helLo" or your style, irb(main):127:0> "hello".gsub(/./){|c| [c,c.swapcase][rand(2)] } => "helLO" lot of c's though, wish i could remove them :) kind regards -botp