Skip to content

Conversation

jeremyevans
Copy link

On Ruby 3.5, method.source_location returns an array with 5 entries instead of 2. Additional entries are start column, end line, and end column.

Don't assume start_line is the last entry in the array, always use offset 1.

If the end line is available, use it instead of splitting the method source and trying to determine the number of lines in it.

On Ruby 3.5, method.source_location returns an array with 5 entries
instead of 2.  Additional entries are start column, end line, and
end column.

Don't assume start_line is the last entry in the array, always use
offset 1.

If the end line is available, use it instead of splitting the method
source and trying to determine the number of lines in it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant