Francis Hwang schrieb:

>
> On Nov 30, 2004, at 6:12 PM, Florian Gross wrote:
>
>> It also seems not to be possible to directly add methods to literals 
>> like this: (Not sure why -- maybe Ruby optimizes literals?)
>
Pardon my igmorance but what is a literal?

> Errrr. So what's the difference between
>
> def ("x").foo; end
>
> and
>
> def (("x")).foo; end
>
> Why do the extra parens make the parser treat it differently? My head 
> hurts.

Mine too - I find these error messages rather missleading
after all both

("x") == "x"

(("x")) == "x"

evalute to true


/Christoph