Sept. 27, 2015
11:05 a.m.
Hi Udo, #^ is invalid by definition. #'^' is the right way to write it. The definition is that # can be followed by a message selector (including binary selectors such as -), or by a quoted string, or by an opening parenthesis (array literal). Regards, Thierry Le 27/09/2015 12:27, Udo Schneider a écrit :
All,
I just hit a case where I needed to return the caret character "^" as a Symbol. However simply doing something like
method ^ #^.
doesn't work. Even inspecting the symbol itself
#^ inspect.
doesn't work. "Quoting" the caret works fine:
method ^ #'^'.
So I'm wondering whether #^ (w/o) quoting is considered to be legal syntax and it's a parser "bug" or whether it's invalid by definition
CU,
Udo