Hi Arup,

Perhaps it's not worth the work to deambiguate this with the global
variable syntax!?
You should agree that is not "that" common to have a Symbol with a
name beginning with a dollar sign.
But, if you have a good use case, you should search the Ruby Issue
Tracking System (https://bugs.ruby-lang.org/).
If nothing on it, fire a issue with a detailed use case.

Abinoam Jr.

PS: Looking quickly I found this
https://bugs.ruby-lang.org/issues/9047. It seems related.

On Wed, Jul 9, 2014 at 5:34 PM, Frank Pinto <frank / ayalo.co> wrote:
> I run into this all the time writing Mongo queries for MongoMapper. I end up
> just using the hash rocket syntax always
>
>
> On Wed, Jul 9, 2014 at 1:23 PM, Arup Rakshit <aruprakshit / rocketmail.com>
> wrote:
>>
>> <doco> http://www.ruby-doc.org/core-2.1.0/Hash.html
>>
>> Hashes allow an alternate syntax form when your keys are always symbols.
>> Instead of
>>
>> options = { :font_size => 10, :font_family => "Arial" }
>> You could write it as:
>>
>> options = { font_size: 10, font_family: "Arial" }
>>
>> Really ? :-)
>>
>> Let me see :-
>>
>> arup@linux-wzza:~/Ruby> pry
>> [1] pry(main)> { :$foo => 12 }
>> => {:$foo=>12}
>> [2] pry(main)> { $foo: 12 }
>> SyntaxError: unexpected ':', expecting =>
>> { $foo: 12 }
>>        ^
>> [2] pry(main)>
>>
>> Doco is not complete. It says use the old syntax, which is always safe.
>>
>> --
>> ================
>> Regards,
>> Arup Rakshit
>> ================
>> Debugging is twice as hard as writing the code in the first place.
>> Therefore,
>> if you write the code as cleverly as possible, you are, by definition, not
>> smart enough to debug it.
>>
>> --Brian Kernighan
>
>