Project

General

Profile

Actions

Bug #19563

closed

Ripper.tokenize(code).join != code when heredoc and multiline %w[] literal is on the same line

Added by tompng (tomoya ishida) about 1 year ago. Updated 11 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.0dev (2023-03-29T21:57:52Z master 1b06422767) [x86_64-linux]
[ruby-core:113059]

Description

Ripper.tokenize "<<EOF || %w[hello\nEOF\n\n\n\nworld]"
# actual result
["<<EOF", " ", "||", " ", "%w[", "hello", "\n\n\n\n", "EOF\n", "world", "]"]
# expected result
["<<EOF", " ", "||", " ", "%w[", "hello", "\n", "EOF\n", "\n\n\n", "world", "]"]

same for %i[] literal.


Files


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #19544: Custom quotes inconsistencyClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0