mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
This commit is contained in:
parent
549c7fe29d
commit
a4a6019550
Notes:
git
2025-03-29 11:47:11 +00:00
Merged-By: tompng <tomoyapenguin@gmail.com>
2 changed files with 46 additions and 1 deletions
6
parse.y
6
parse.y
|
@ -9036,7 +9036,7 @@ here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
|
|||
if (!has_delayed_token(p)) {
|
||||
dispatch_scan_event(p, tSTRING_CONTENT);
|
||||
}
|
||||
else {
|
||||
else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
|
||||
if ((len = p->lex.pcur - p->lex.ptok) > 0) {
|
||||
if (!(func & STR_FUNC_REGEXP)) {
|
||||
int cr = ENC_CODERANGE_UNKNOWN;
|
||||
|
@ -9051,6 +9051,10 @@ here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
|
|||
}
|
||||
dispatch_delayed_token(p, tSTRING_CONTENT);
|
||||
}
|
||||
else {
|
||||
dispatch_delayed_token(p, tSTRING_CONTENT);
|
||||
dispatch_scan_event(p, tSTRING_CONTENT);
|
||||
}
|
||||
lex_goto_eol(p);
|
||||
#endif
|
||||
heredoc_restore(p, &p->lex.strterm->u.heredoc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue