From: Brian Candler Date: 2009-06-05T04:38:38+09:00 Subject: Re: block as string Louis-Philippe wrote: > I'll probably stick one of your trick onto a block Brian, something > like: OK - not sure why you're eval'ing it a line at a time though, instead of all at once, as that would prevent you doing lots of interesting things, like loops written across multiple lines. I see you're using a global var. You may want to check out instance_eval (to set the default method receiver to an arbitrary object), and the 'binding' parameter to eval (to be able to access local variables from a different scope) Regards, Brian. -- Posted via http://www.ruby-forum.com/.