Skip to content

Don't clear callInfo for Ruby methods#8922

Merged
headius merged 3 commits intojruby:masterfrom
headius:ruby2_kwargs_indy_fix
Jul 21, 2025
Merged

Don't clear callInfo for Ruby methods#8922
headius merged 3 commits intojruby:masterfrom
headius:ruby2_kwargs_indy_fix

Conversation

@headius
Copy link
Member

@headius headius commented Jul 21, 2025

In #8918 we attempted to fix an issue where the keyword arguments callInfo flags were getting stuck passing through a native method that did not formally accept keyword arguments. Unfortunately that change incorrectly included Ruby-based ruby2_keywords methods in the set of methods considered to not accept formal keywords and require callInfo clearing. This led to #8920 where a ruby2_keywords method fails to properly forward incoming keyword arguments to a non-ruby2_keywords method.

The fix here narrows the callInfo clearing to only native methods that do not formally accept keywords, preventing such flags from propagating to other calls but avoiding the callInfo clearing previously done for ruby2_keywords Ruby-based methods.

@headius headius added this to the JRuby 10.0.2.0 milestone Jul 21, 2025
headius added 2 commits July 21, 2025 13:07
No previous case existed for a ruby2_keywords method forwarding
keyword arguments to a normal keyword-receiving method.

See jruby#8920
@floehopper
Copy link

I haven't had time to look into it, but I've seen a possible regression in v10.0.2.0 which sounds like it might be related to the change in this PR. See this Mocha CI build failure.

@floehopper
Copy link

@headius I've done a bit of investigation in freerange/mocha#760. It seems as if the problem(s) may have existed since v10.0.1.0, but may only be surfaced when the tests are run in a particular order, so the changes in this PR might be a red herring. Obviously it's possible there is a flaw in the Mocha tests, but I note that the same test failures do not occur when running against CRuby v3.4.5 or v3.5.0preview1.

@headius
Copy link
Member Author

headius commented Aug 26, 2025

@floehopper If we do not behave the same way as CRuby 3.4, then it's a bug in JRuby... so I'm glad you have reported this and done some extra homework!

Please open a new JRuby issue with everything you know so far and try to provide some way we can reproduce it.

@floehopper
Copy link

@headius I’ve created #8976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KWargs issue with mustermann gem preventing JRuby 10.0.1.0 upgrade

2 participants