-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Reapply "[Feature #6012] Extend source_location for end position
#15580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
* This reverts commit 065c48c. * This functionality is very valuable and has already taken 14 years to agree on the API. * Let's just document it's byte columns (in the next commit). * See https://bugs.ruby-lang.org/issues/21783#note-9
nobu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should avoid the word “column” in the documents, because of the ambiguities.
|
Good point, especially since column might imply it starts at 1.
So maybe:
(using matz's words from https://bugs.ruby-lang.org/issues/21783#note-8)
? |
…bdas * Consistent with plain `blocks` and `for` blocks and methods where the source_location covers their entire definition. * Matches the documentation which mentions "where the definition starts/ends". * Partially reverts d357d50 which was a workaround to be compatible with parse.y.
7ac7008 to
a1c18d0
Compare
|
I have updated to this one for now:
because "byte index" sounds to me rather confusing in this context. |
|
I'm fine with the code in here, pending approval from whomever makes the final decision. |
to agree on the API.
Also:
So this PR fixes all known issues about {Method,UnboundMethod,Proc}#source_location.