Skip to content

Commit

Permalink
[ruby/prism] Disallow newlines in heredoc identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton authored and matzbot committed May 23, 2024
1 parent a99d79d commit 7d89d52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions prism/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 7d89d52

Please sign in to comment.