Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Prism::Translation::Ripper#bounds
bounds(location)
lib/prism/translation/ripper.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/prism/translation/ripper.rb, line 3375
def bounds(location)
@lineno = location.start_line
@column = location.start_column
end
This method is responsible for updating lineno and column information to reflect the current node.
This method could be drastically improved with some caching on the start of every line, but for now it’s good enough.