From: gwelch925@... Date: 2015-08-14T05:23:28+00:00 Subject: [ruby-core:70378] [Ruby trunk - Feature #11390] Allow symbols starting with numbers Issue #11390 has been updated by Grant Welch. Sameer Deshmukh wrote: > Currently it is not possible to create a symbol that looks like `:1twothree`. > > Converting to a string and then symbolizing causes hash lookup problems and proves counter-intuitive. What's also surprising is that ruby allows symbols to start with special characters but not numbers. The non-quoted symbol format follows the same naming rules as variables (local, instance, class, global), methods, and constants (Modules, Classes, and Constants). Otherwise, you'll have to resort to the quoted string format. Also, notice that: ~~~ :foo == :'foo' # => true ~~~ Variable and Method Naming Rules: http://ruby-doc.org/core-2.2.2/doc/syntax/assignment_rdoc.html ---------------------------------------- Feature #11390: Allow symbols starting with numbers https://bugs.ruby-lang.org/issues/11390#change-53782 * Author: Sameer Deshmukh * Status: Open * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- Currently it is not possible to create a symbol that looks like `:1twothree`. Converting to a string and then symbolizing causes hash lookup problems and proves counter-intuitive. What's also surprising is that ruby allows symbols to start with special characters but not numbers. -- https://bugs.ruby-lang.org/