Eric Bennett <ericb / eb.to> wrote:

>I don't know how to get rid of the eval, but you can move the print out of
>it and get it into a nice functional form:
>
>def expression_for_string( string )
>	'"' + string.gsub( /(["\\])/, '\\\\\1' ) + '"'
>end

I wouldn't call that "backslash-monster" nice but overall it's a nice
solution. "Kernel.binding()" was the missing link I was looking for.
Thanks!

bye
-- 
Stefan Matthias Aust \/ Truth Until Paradox