Skip to content

Prism.parse "<<A+%\na\nA\nb\n" exits with Assertion failed #1616

@tompng

Description

@tompng
$ ruby -rprism -I lib -e 'Prism.parse "<<A+%\na\nA\nb\n"'
Assertion failed: (list->size == 0 || newline_offset > list->offsets[list->size - 1]), function pm_newline_list_append, file pm_newline_list.c, line 41.
zsh: abort      ruby -rprism -I lib -e 'Prism.parse "<<A+%\na\nA\nb\n"'

Parse failed code

<<A+%
a
A
b
<<A+%q
a
A
b

Same for "<<A+%r\nA" "<<A+%s\nA" "<<A+%x\nA" "<<A+%Q\nA"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions