From: Ryan Davis Date: 2011-01-18T10:21:26+09:00 Subject: Re: Obscure syntax error On Jan 17, 2011, at 14:56 , Abinoam Jr. wrote: >> I think the explanation is simple: you (most likely) found a bug in the parser. >> >> You should report this to ruby-core@ > > In my humble opinion I think it's even simpler than that. > ... > If you have an object (expression returning an object reference) what > are the syntactic constructs allowed after that? A symbol should be allowed anywhere any other literal is allowed. > % echo 'x = nil; x "y"' | ruby -c > Syntax OK > % echo 'x = nil; x :y' | ruby -c > -:1: syntax error, unexpected ':', expecting $end > % echo 'x = nil; x :"y"' | ruby -c > -:1: syntax error, unexpected ':', expecting $end