Project

General

Profile

Actions

Bug #19736

closed

Ripper.tokenize ignores token after heredoc_beg when embexpr inside heredoc is unclosed

Added by tompng (tomoya ishida) 12 months ago. Updated 12 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.0dev (2023-06-19T09:28:10Z master 2a80bac9f0) [x86_64-linux]
[ruby-core:113938]

Description

I expect Ripper.tokenize(code) to tokenize +1+2+3\n part.

code = <<'RUBY'
<<A+1+2+3
#{4
RUBY
Ripper.tokenize code
# => ["<<A", "\#{", "4", "\n"]

It will be easy for IRB's internal code to handle indent and other things if Ripper.tokenize can tokenize all part of the code even if it is incomplete.

Actions #1

Updated by nobu (Nobuyoshi Nakada) 12 months ago

  • Status changed from Open to Closed

Applied in changeset git|6be402e172a537000de58a28af389cb55dd62ec8.


[Bug #19736] Recover after unterminated interpolation

Actions

Also available in: Atom PDF

Like1
Like0