From b97ff7dfdae59e688609c008a459cf264362490f Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Wed, 25 Sep 2024 14:23:29 -0400 Subject: [PATCH] [ruby/prism] Fix up lex difference when ~ heredoc with 0 dedent and line continuation https://github.com/ruby/prism/commit/84a9251915 --- lib/prism/lex_compat.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prism/lex_compat.rb b/lib/prism/lex_compat.rb index 4f8e443a3b..a83c24cb41 100644 --- a/lib/prism/lex_compat.rb +++ b/lib/prism/lex_compat.rb @@ -481,7 +481,7 @@ module Prism embexpr_balance -= 1 when :on_tstring_content if embexpr_balance == 0 - while index < max_index && tokens[index].event == :on_tstring_content + while index < max_index && tokens[index].event == :on_tstring_content && !token.value.match?(/\\\r?\n\z/) token.value << tokens[index].value index += 1 end