Project

General

Profile

Actions

Bug #21202

closed

Ripper wrongly concats separate tstring_content within nested unterminated heredoc

Added by tompng (tomoya ishida) 3 days ago. Updated 1 day ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.5.0dev (2025-03-27T18:17:40Z master 67d1dd2ebd) +PRISM [x86_64-linux]
[ruby-core:121458]

Description

code = <<~'CODE'
  <<H1
  #{<<H2}a
  H2
  b
CODE

Ripper.tokenize(code) #=> ["<<H1", "\n", "\#{", "<<H2", "}", "a\nb\n", "H2\n"]

"a\nb\n" should be a separate token "a\n" and "b\n"

Updated by tompng (tomoya ishida) 3 days ago

  • ruby -v set to ruby 3.5.0dev (2025-03-27T18:17:40Z master 67d1dd2ebd) +PRISM [x86_64-linux]
Actions #2

Updated by tompng (tomoya ishida) 1 day ago

  • Status changed from Open to Closed

Applied in changeset git|a4a60195502add094fb52a587411bbd0c19facce.


[Bug #21202] Fix wrong token concat while tokenizing nested unterminated heredoc (#13000)

Actions

Also available in: Atom PDF

Like0
Like0Like0