From: Navindra Umanee Date: 2005-02-08T10:45:39+09:00 Subject: Re: Delayed string interpolation Hal Fulton wrote: > def interp(x,y) > "The sum of #{x} and #{y} is #{x+y}" > end > > str = interp(210,27) # "The sum of 210 and 27 is 237" Unless I'm mistaken, this recomputes the whole string every time interp is called. I wanted to compute the common parts of the string, cache it somewhere, and then compute the rest in another context. Hence, a 2-step interpolation. Cheers, Navin.