diff options
| author | Earlopain <14981592+Earlopain@users.noreply.github.com> | 2025-01-12 15:27:46 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-01-12 18:34:36 +0000 |
| commit | 48749afe61fedcfd59cbd2fcc134c55f5ccef7f8 (patch) | |
| tree | 022aa92ca48deb1a25df53bfc6da1af9f527ccfd /lib | |
| parent | d0deec3ef3a439374e77aad6fd90bc8f9c5bcc90 (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.rb | 2 |
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| |
