From: Matma Rex Date: 2013-01-04T04:57:04+09:00 Subject: Re: :@fudgeKittens, the use of ':' with '@' On Thu, 03 Jan 2013 20:45:44 +0100, Ricky Ng wrote: > I have run into some code that widely uses symbols with the '@' sign. > Example: :@enable. > > Is this considered legal syntax? Yes, :@enable creates a symbol for "@enable". This is the same as "@enable".to_sym, valid, and useful if you need to access instance variables of a class using instance_variable_get, as it takes a symbol argument. I think the syntax is allowed specifically for this case, similarly to how you can have constructs like :== or :<=> for appropriate symbols, to be used in other contexts as method names.