Skip to content

Commit

Permalink
Merge pull request #2833 from ruby/heredoc-ident-newline
Browse files Browse the repository at this point in the history
Disallow newlines in heredoc identifiers
  • Loading branch information
kddnewton committed May 23, 2024
2 parents 428d64b + 737f2c2 commit f313f37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -10949,6 +10949,7 @@ parser_lex(pm_parser_t *parser) {
// If we have quotes, then we're going to go until we find the
// end quote.
while ((parser->current.end < parser->end) && quote != (pm_heredoc_quote_t) (*parser->current.end)) {
if (*parser->current.end == '\r' || *parser->current.end == '\n') break;
parser->current.end++;
}
}
Expand Down

0 comments on commit f313f37

Please sign in to comment.