Skip to content

Symbol literals with interpolation are not allowed in hash patterns #340

Open
@kddnewton

Description

Found this while importing your tests into YARP. On this line:

in {"#{"a"}": 1} then

It's actually a syntax error.

case foo
in {"#{"a"}": 1}
end

Running ruby -c gives:

test.rb: test.rb:2: symbol literal with interpolation is not allowed (SyntaxError)
in {"#{"a"}": 1}
    ^~~~~~~~~

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions