From: Eric Mahurin Date: 2005-11-19T08:34:53+09:00 Subject: Re: Symbol#inspect bug? On 11/18/05, Dominik Bathon wrote: > Hallo, > > Symbol#inspect should return a valid symbol literal, right? > > But it doesn't for symbols starting with a digit: > > irb(main):001:0> p :"9" > :9 > => nil > irb(main):002:0> :9 > SyntaxError: compile error > (irb):2: syntax error > from (irb):2 > > > Dominik It also doesn't work for many of the operators: p(:'=') := p(:=) SyntaxError: compile error (irb):14: syntax error p(:=) It seems like if the symbol string is not a valid identifier, it should be quoted by Symbol#inspect.