From: Jari Williamsson Date: 2008-02-28T08:06:50+09:00 Subject: Re: String interpolation method? John Carter wrote: > Ok, I'm being stupid probably... > > But I can't spot a method to do string interpolation. > > I have a string... > > a = 'bra#{c}ket' > > The variable c isn't available at the stage of setting that up. Hence > the use of '' instead of "". > > The variable will be available later.... > > At that stage I want to do something like... > > c=' see ' > a.interpolate > > The closest I can get is a bit fugly... > > eval "\"#{a}\"" > => "bra see ket" > > Any better way? eval a Best regards, Jari Williamsson