diff options
author | Kevin Newton <[email protected]> | 2024-05-23 11:28:32 -0400 |
---|---|---|
committer | git <[email protected]> | 2024-05-23 15:51:27 +0000 |
commit | 7d89d52714bdde9ae369ff04020a96433bfd4d94 (patch) | |
tree | 67199d7ebf6d3f40275482b58c48f67bb95df651 | |
parent | a99d79dd318d525ecf2335c7c7d652eed860e1f5 (diff) |
[ruby/prism] Disallow newlines in heredoc identifiers
https://github.com/ruby/prism/commit/737f2c2117
-rw-r--r-- | prism/prism.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/prism/prism.c b/prism/prism.c index 5b27333f22..86a4aa90b0 100644 --- a/prism/prism.c +++ b/prism/prism.c @@ -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++; } } |