instance method
Prism::Location#chop
chop
lib/prism/parse_result.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/parse_result.rb, line 339
def chop
copy(length: length == 0 ? length : length - 1)
end
Returns a new location that is the result of chopping off the last byte.
See also
#cached_start_code_units_offset
#comments
#cached_start_code_units_column
#copy
also in
3.4