Skip to content

[pull] master from ruby:master#789

Merged
pull[bot] merged 4 commits intoturkdevops:masterfrom
ruby:master
Feb 18, 2026
Merged

[pull] master from ruby:master#789
pull[bot] merged 4 commits intoturkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link

@pull pull bot commented Feb 18, 2026

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 : )

etiennebarrie and others added 4 commits February 18, 2026 22:04
When building on macOS, we get a warning about duplicate libraries

    ld: warning: ignoring duplicate libraries: '-ldl', '-lobjc', '-lpthread'

To fix it, we now append $(MAINLIBS) to LIBRUBYARG_SHARED (when shared
is enabled), matching what's already done for LIBRUBYARG_STATIC. And we
remove the now-redundant $(MAINLIBS) from the $(PROGRAM) link line,
since $(LIBRUBYARG) carries it in both cases.
Previously, when dealing with a `super()` nested in a block that runs as
a method (through e.g. `define_method`), YJIT generated a guard that
never passes leading to a misidentification of the callsite as
megamorphic and an unconditional interpreter fallback.

The issue was in the subroutine to find the currently running method
entry. In the interpreter, this is rb_vm_frame_method_entry(). YJIT used
`gen_get_lep()` to find the EP with `VM_ENV_FLAG_LOCAL`, but in case
of BMETHODs, the corresponding CME is never at an EP level with
`VM_ENV_FLAG_LOCAL` set.

Because each block nesting level can dynamically run as either a BMETHOD
or not, starting at a block and finding the first EP that has a method
entry ultimately requires a search loop such as the one in rb_vm_frame_method_entry().
This patch introduces such a loop.

Because `invokesuper` in a block can now work end-to-end, add check for the
previously masked "implicit argument passing of super from method
defined by define_method() is not supported..." condition.
As we found out from YJIT, `super` from within a block needs a loop for
the running CME guard, and the current LEP based guard always fails.
Don't specialize for now so we use the fallback instead of side-exiting.
After a review of all callers, this doesn't appear to be needed for
correct behavior. We could potentially have a future case where it
is needed, such as a method that inserts a record into the set and
returns the inserted record (which could be different from the
argument if the argument was an unfrozen string). However, we don't
currently have such a case, and it's better for performance to
remove the code.
@pull pull bot locked and limited conversation to collaborators Feb 18, 2026
@pull pull bot added the ⤵️ pull label Feb 18, 2026
@pull pull bot merged commit 6273827 into turkdevops:master Feb 18, 2026
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments