What about

y = lambda{ | str | str.empty? ? "" : y[ str[1..-1] ] + str[0] }

Cheers
Robert


-- 
The 1,000,000th fibonacci number contains '42' 2039 times; that is
almost 30 occurrences more than expected (208988 digits).
N.B. The 42nd fibonacci number does not contain '1000000' that is
almost the expected 3.0e-06 times.