Add specs for Method#/UnboundMethod#original_name through three-alias chain#1354
Merged
eregon merged 1 commit intoruby:masterfrom May 4, 2026
Merged
Conversation
…as chain Extend MethodSpecs::Methods and UnboundMethodSpecs::Methods with a third alias hop (alias qux baz), and add examples verifying that Method#original_name and UnboundMethod#original_name still return :foo when reached through three levels of aliasing. The existing "aliased twice" examples only exercise two-hop chains, which doesn't catch implementations that resolve a fixed depth rather than walking the full chain.
eregon
approved these changes
May 4, 2026
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.
Extend MethodSpecs::Methods and UnboundMethodSpecs::Methods with a third alias hop (alias qux baz), and add examples verifying that Method#original_name and UnboundMethod#original_name still return :foo when reached through three levels of aliasing.
The current two step one can be passed by an implementation does not walk the full chain.
Noticed that the two step test passes on JRuby master and fails if you add a third step when working on adding #1353.