Skip to content

Commit

Permalink
[ruby/prism] Rebase against main
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton authored and matzbot committed Feb 24, 2024
1 parent aa88414 commit 804b2a3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 209 deletions.
2 changes: 1 addition & 1 deletion lib/prism/parse_result.rb
Expand Up @@ -67,7 +67,7 @@ def character_column(byte_offset)
# concept of code units that differs from the number of characters in other
# encodings, it is not captured here.
def code_units_offset(byte_offset, encoding)
byteslice = source.byteslice(0, byte_offset).encode(encoding)
byteslice = (source.byteslice(0, byte_offset) or raise).encode(encoding)
(encoding == Encoding::UTF_16LE || encoding == Encoding::UTF_16BE) ? (byteslice.bytesize / 2) : byteslice.length
end

Expand Down
208 changes: 0 additions & 208 deletions lib/prism/ripper_compat.rb

This file was deleted.

0 comments on commit 804b2a3

Please sign in to comment.