rename all closures to more closely match a name you can read vs CLOSURE_2#8203
Merged
enebo merged 4 commits intojruby:masterfrom Apr 19, 2024
Merged
rename all closures to more closely match a name you can read vs CLOSURE_2#8203enebo merged 4 commits intojruby:masterfrom
enebo merged 4 commits intojruby:masterfrom
Conversation
This will make scope names much easier to glance at to know what they
are. This also corrects line number from 0-based to 1-based.
CLOSURE_1::CLOSURE_2 is just not super easy to grok. This new form
will make the closure a combination of the method name using the closure
along with the closure parameters. For raw lambdas the name will be
->({vars})_{id}.
We still emit closure id onto end of the new name since we can still have
identical closure strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow closures names of scopes to be more readable:
retriable::CLOSURE_1::CLOSURE2now looks likeretriable::times &|index|2::any? &|e|4Literal lambdas also print out with
->(a)1.