From: merch-redmine@... Date: 2019-08-07T14:22:40+00:00 Subject: [ruby-core:94182] [Ruby master Bug#16050] :@ is not parsed correctly Issue #16050 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Rejected I don't think this is a bug. Just because `:@iv` is valid syntax does not imply that `:@` should also be valid syntax. You should use a quoted symbol (note that `Symbol#inspect` quotes the symbol): ```ruby :'@' # => :"@" '@'.to_sym # => :"@" ``` ---------------------------------------- Bug #16050: :@ is not parsed correctly https://bugs.ruby-lang.org/issues/16050#change-80439 * Author: sawa (Tsuyoshi Sawada) * Status: Rejected * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- Symbol literal allows `@` as the first character: ```ruby :@foo # => :@foo ``` Nevertheless, it does not allow `@` by itself: ```ruby :@ # >> SyntaxError: `@' without identifiers is not allowed as an instance variable name ``` This resembles #10463, but while #10463 is related to placeholder in a method name, the issue here is related to instance variable name, so I think they are different issues. -- https://bugs.ruby-lang.org/ Unsubscribe: