[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: #{} and \" don't like each other

Warren Brown

9/16/2003 11:39:00 PM

P> print "<user #{"name=\"" + name + "\""}></user>"
...
P> AFAICS, it is grammatically perfectly sound.
...
H> I agree, it seems like a reasonable construction.

I investigated this a little bit. The relevant code starts at line 4079
in parse.y. I am not familiar enough with the inner workings of parse.y to
see offhand what this code is trying to do, but it was obviously inserted to
specifically catch this situation. This may simply be a limitation in the
way quoting is implemented.

P> Maybe we should ask Matz...
H> I think we should. Or we just did.

I third the motion!

- Warren Brown