How do you reverse a string in Ruby? I know about string#reverse. I\'m interested in understanding how to write it in pure Ruby, preferably an in-place solution.
"abcde".chars.reduce{|s,c| c + s } # => "edcba"