Skip to content

Stab at Fixing #8976#9192

Merged
headius merged 3 commits intojruby:masterfrom
enebo:topic/kwarg_fix
Jan 28, 2026
Merged

Stab at Fixing #8976#9192
headius merged 3 commits intojruby:masterfrom
enebo:topic/kwarg_fix

Conversation

@enebo
Copy link
Member

@enebo enebo commented Jan 28, 2026

This effectively fixes mocha by noticing a splatted list with a ruby2keywordhash being passed into a ruby2keyword method. So it dups and strips the ruby2keyword hash state. The other half of this was to not dup blindly in a couple of code paths if it is a ruby2keywordhash.

@enebo enebo added this to the JRuby 10.0.3.0 milestone Jan 28, 2026
enebo and others added 2 commits January 28, 2026 16:09
JRuby was overzealous in duping kwargs hashes, losing the
ruby2_keywords_hash bit in the process. This backs off duping
and only does so if receiving ruby2 kwargs for a modern kwargs
method.

See jruby#8976
@headius
Copy link
Member

headius commented Jan 28, 2026

Aces. Thanks for the help on this one!

@headius headius merged commit ee491bf into jruby:master Jan 28, 2026
77 checks passed
@headius headius linked an issue Jan 28, 2026 that may be closed by this pull request
@enebo enebo deleted the topic/kwarg_fix branch January 30, 2026 14:56
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.

Regression in keyword argument matching in JRuby v10.0.1.0

2 participants