From: Chris Hulan Date: 2009-01-17T02:43:55+09:00 Subject: Re: String interpolation at a later stage On Jan 16, 10:41 am, Raj Singh wrote: > x = 'hello' > y = '#{x} world' > > desired result = 'hello world' > > Please note that variable y has the string interpolation code under > single quotes. > > I have these two values x and y. And with that I need to get to the > desired result. Any suggestion on how to do that. > > I tried eval y but that won't work because world is not a variable. > -- > Posted viahttp://www.ruby-forum.com/. try: z = '"' + y + '"' zz = eval z