From: Navindra Umanee Date: 2005-02-08T01:52:01+09:00 Subject: Re: delayed string interpolation Bill Kelly wrote: > I dunno if this counts as elegant or not, :) > but a couple years ago, I used: > > class String > def reeval(b = TOPLEVEL_BINDING) > eval(%Q{<<"END_REEVAL"\n} + self + "\nEND_REEVAL\n", b) > end > end I have to say this is such a really neat hack... it says so much about Ruby too. I had a hard time understanding it until I realised that the first END_REEVAL doesn't need to be in quotes. Writing it as: eval("<