Project

General

Profile

Actions

Bug #16050

closed

:@ is not parsed correctly

Added by sawa (Tsuyoshi Sawada) over 4 years ago. Updated over 4 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:94172]

Description

Symbol literal allows @ as the first character:

:@foo # => :@foo

Nevertheless, it does not allow @ by itself:

:@ # >> 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.

Actions

Also available in: Atom PDF

Like0
Like0Like0