From: "Mariusz Pękala" Date: 2007-05-17T23:39:47+09:00 Subject: Re: Coopting String interpolation --XF85m9dhOBO43t/C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-05-17 21:27:56 +0900 (Thu, May), Aureliano Calvo wrote: > Now I see that if I can transform all the <"a#{expression}c"> in <"a" > + (expression) + "c"> in a ruby source code string, I could change > expression with "a#{expression}c" in "a" + clever_stuff(expression) + > "c" and use my changed + method in Strings. Is there an easy way to > manipulate ruby code in ruby to do this? Maybe this will be of some use: irb(main):005:0> "asd_#{raise caller.to_s}_" RuntimeError: /usr/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'/usr/li= b/ruby/1.8/irb/workspace.rb:52 from (irb):5 --=20 No virus found in this outgoing message. Checked by 'grep -i virus $MESSAGE' Trust me. --XF85m9dhOBO43t/C Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7-ecc0.1.6 (GNU/Linux) iD8DBQFGTGkXsnU0scoWZKARAp84AKCzKh5oifiGgcMRjj019v+dmLNQAgCeNlnx irZBHeDZuZ9P9b7LLN5ggx0= =O+DC -----END PGP SIGNATURE----- --XF85m9dhOBO43t/C--