Skip to content

Heredoc identifier can accept any starting identifier value #15855

Open
@devnote-dev

Description

@devnote-dev

Typically, all identifiers must start with an ASCII letter or underscore and proceeding alphanumeric character, however, numeric and underscore-only identifiers are accepted for heredocs:

p <<-123
  4567
      654
  123
# => "4567\n    654"

p <<-_
  foo
  bar
  _
# => "foo\nbar"

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugA bug in the code. Does not apply to documentation, specs, etc.topic:compiler:parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions