summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2024-09-25 14:23:29 -0400
committergit <svn-admin@ruby-lang.org>2024-09-25 18:35:05 +0000
commitb97ff7dfdae59e688609c008a459cf264362490f (patch)
treec803e4424cecb23691ca1b025fd38f1a97e2986e
parent12cf9f2ae57f84278cbee8bc20d2af697efc66f1 (diff)
[ruby/prism] Fix up lex difference when ~ heredoc with 0 dedent and line continuation
https://github.com/ruby/prism/commit/84a9251915
-rw-r--r--lib/prism/lex_compat.rb2
1 files changed, 1 insertions, 1 deletions
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