From: Robert Klemme Date: 2009-02-20T00:40:31+09:00 Subject: Re: Replacing values 2009/2/19 lasitha : > On Thu, Feb 19, 2009 at 8:47 PM, lasitha wrote: >> I don't know a way to construct a string that defers interpolation >> (though i suspect there must be one). >> >> If not, you could use 'eval' or perhaps a Proc: >> > Oops, sorry - please ignore the bit about using a Proc. It doesn't > solve anything since all it does is parameterize the result and you > could have done that with just a regular method. > > So at this point eval is all i can think of (see Robert's post). Still I would consider an ordinary method or a lambda superior to using eval. I try to avoid eval whenever possible because of security and other implications. For me it's really only a last resort for things that can't be done otherwise (e.g. defining methods which must have an explicit block parameter). Kind regards robert -- remember.guy do |as, often| as.you_can - without end