Don't clear callInfo for Ruby methods#8922
Conversation
No previous case existed for a ruby2_keywords method forwarding keyword arguments to a normal keyword-receiving method. See jruby#8920
|
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. |
|
@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. |
|
@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. |
Don't clear callInfo for Ruby methods
In #8918 we attempted to fix an issue where the keyword arguments
callInfoflags were getting stuck passing through a native method that did not formally accept keyword arguments. Unfortunately that change incorrectly included Ruby-basedruby2_keywordsmethods in the set of methods considered to not accept formal keywords and requirecallInfoclearing. This led to #8920 where aruby2_keywordsmethod fails to properly forward incoming keyword arguments to a non-ruby2_keywordsmethod.The fix here narrows the
callInfoclearing to only native methods that do not formally accept keywords, preventing such flags from propagating to other calls but avoiding thecallInfoclearing previously done forruby2_keywordsRuby-based methods.