I'm surprised nobody has yet shown using 'inject', as for once it makes 
sense here.

a = "foobar"
puts a.each_char.inject("") { |str,chr| chr+str }   # raboof

-- 
Posted via http://www.ruby-forum.com/.