Actions
Bug #14621
closedExtra whitespace in squiggly heredoc with escaped newline
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
Backport:
Description
puts <<~TXT.inspect
1 \
2
TXT
Expected:
"1 2\n"
Got:
"1 2\n"
Updated by printercu (Max Melentiev) over 6 years ago
- ruby -v set to ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
Updated by printercu (Max Melentiev) over 6 years ago
Tested in ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux] - same result.
Updated by nobu (Nobuyoshi Nakada) over 6 years ago
- Description updated (diff)
- Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED
Updated by nobu (Nobuyoshi Nakada) over 6 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r62872.
parse.y: unindent continued line
- parse.y (tokadd_string): stop at continued line in dedented here
documents, to dedent for each lines before removing escaped
newlines. [ruby-core:86236] [Bug #14621]
Updated by nobu (Nobuyoshi Nakada) over 6 years ago
r62872 has a bug.
<<-TEXT
\
TEXT
should raise a syntax error, "can't find string "TEXT" anywhere before EOF
".
I'll fix it.
Updated by nobu (Nobuyoshi Nakada) over 6 years ago
- Status changed from Closed to Open
Updated by nobu (Nobuyoshi Nakada) over 6 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r62873.
parse.y: terminator at continued line
- parse.y (here_document): a continuing line is not the
terminator. [ruby-core:86283] [Bug #14621]
Updated by nagachika (Tomoyuki Chikanaga) almost 6 years ago
- Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED to 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE
ruby_2_5 r67050 merged revision(s) 62872,62873.
Updated by usa (Usaku NAKAMURA) over 5 years ago
- Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE to 2.3: REQUIRED, 2.4: DONE, 2.5: DONE
ruby_2_4 r67147 merged revision(s) 62872,62873.
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0