Skip to content

Backport indy ruby2_keywords ArgumentError fix#9001

Merged
headius merged 2 commits into
jruby:jruby-9.4from
headius:ruby2_kwargs_indy_fix_9.4
Oct 23, 2025
Merged

Backport indy ruby2_keywords ArgumentError fix#9001
headius merged 2 commits into
jruby:jruby-9.4from
headius:ruby2_kwargs_indy_fix_9.4

Conversation

@headius

@headius headius commented Sep 9, 2025

Copy link
Copy Markdown
Member

Backport of #8922.

Fixes #9000.

@headius

headius commented Sep 9, 2025

Copy link
Copy Markdown
Member Author

Seems to be another fix made in 10 that needs to be backported. @enebo do you know what change fixed the failing specs here?

@enebo

enebo commented Sep 19, 2025

Copy link
Copy Markdown
Member

@headius I would have to guess that because interp and JIT sometimes call different IRRuntimeHelper methods there is a disparity between the versions. These all appear to involve variable arity so I don't think it involves the JITs fixed arity path.

@headius headius force-pushed the ruby2_kwargs_indy_fix_9.4 branch from 96df0a3 to 185d62e Compare October 23, 2025 18:32
@headius headius merged commit baa8254 into jruby:jruby-9.4 Oct 23, 2025
97 checks passed
@headius headius deleted the ruby2_kwargs_indy_fix_9.4 branch October 23, 2025 18:50
headius pushed a commit that referenced this pull request Jul 8, 2026
The backport of kwargs tweaks from 10.x in #9001 (185d62e) dropped the
CALL_SPLATS guard present in 10.x kwargsActionJIT. As a result, the JIT
specific-arity receive path dups and unflags any ruby2_keywords-flagged
hash, even when it is passed as an ordinary positional argument rather
than through a splat. CRuby, JRuby 9.4.14.0, and JRuby 10.x pass the
same object through with its flag intact.

This corrupted Rails ActiveJob argument serialization, which checks
Hash.ruby2_keywords_hash? on a hash received as a positional parameter:
jobs enqueued with keyword arguments were persisted with _aj_symbol_keys
instead of _aj_ruby2_keywords and failed at execution with
'wrong number of arguments'.

Restore the CALL_SPLATS guard to match 10.x.

Co-Authored-By: Claude Fable 5 <[email protected]>
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.

2 participants