[pull] master from ruby:master#992
Merged
pull[bot] merged 5 commits intoturkdevops:masterfrom May 7, 2026
Merged
Conversation
Without this patch, there are multiple issues when defining a zsuper method via a refinement. These issues are due to the orig_me entry for the zsuper method not being updated when the method it refers to is modified via: * Method being redefined (in same or closer ancestor) * Method being removed * Method being undef-ed (in same or closer ancestor) * Method being overridden by method in included module * Method being overridden by method in prepended module * Method being defined in an included/prepended module at time of refinement This includes a comprehensive test suite for these cases, using both zsuper methods and iseq methods that call super. Without the changes to refinement method lookup, the following types of errors occur for refinement zsuper methods (all of the iseq methods that call super work correctly with or without these changes): * Incorrect result (not returning result of expected method, not raising NoMethodError if the method was removed or has been undef-ed) * SystemStackError: stack level too deep * NotImplementedError: false() function is unimplemented on this machine This avoids the issues with refinement zsuper lookup by turning the zsuper into a cfunc that uses rb_call_super_kw. This is not a perfect solution, for two reasons: * cfuncs are slower than zsuper * arity/parameters for the method not as helpful (you It may possible to avoid these issues by clearing method caches in more cases. However, I think that would require a lot of extra work, since you cannot just clear the method cache for the current class. You would need to clear it for all subclasses that are refined, and if this is a module, do the same for all classes that include/prepend the module, as well as any subclasses of those classes. Considering the need for refinement zsuper methods is very rare, the performance and arity/parameters issues seem acceptable (to me). Fixes [Bug #22022]
Bumps the github-actions group with 1 update in the / directory: [actions/labeler](https://github.com/actions/labeler). Updates `actions/labeler` from 6.0.1 to 6.1.0 - [Release notes](https://github.com/actions/labeler/releases) - [Commits](actions/labeler@634933e...f27b608) --- updated-dependencies: - dependency-name: actions/labeler dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )