summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEarlopain <14981592+Earlopain@users.noreply.github.com>2025-01-12 15:27:46 +0100
committergit <svn-admin@ruby-lang.org>2025-01-12 18:34:36 +0000
commit48749afe61fedcfd59cbd2fcc134c55f5ccef7f8 (patch)
tree022aa92ca48deb1a25df53bfc6da1af9f527ccfd /lib
parentd0deec3ef3a439374e77aad6fd90bc8f9c5bcc90 (diff)
[ruby/prism] Fix parser translator ranges for mulltiline strings with multiline bytes
A rather silly issue with a rather simple fix. The ranges already use the offset cache, this effectivly double-encoded them. https://github.com/ruby/prism/commit/66b65634c0
Diffstat (limited to 'lib')
-rw-r--r--lib/prism/translation/parser/lexer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/prism/translation/parser/lexer.rb b/lib/prism/translation/parser/lexer.rb
index 550219fc48..fd1d0243ca 100644
--- a/lib/prism/translation/parser/lexer.rb
+++ b/lib/prism/translation/parser/lexer.rb
@@ -409,7 +409,7 @@ module Prism
# it emits a single string node. The backslash (and remaining newline) is removed.
current_line = +""
adjustment = 0
- start_offset = offset_cache[token.location.start_offset]
+ start_offset = token.location.start_offset
emit = false
lines.each.with_index do |line, index|