Skip to content

Fix arity specs for blocks in language#8554

Merged
enebo merged 2 commits intojruby:10-devfrom
enebo:fix_arity
Jan 5, 2025
Merged

Fix arity specs for blocks in language#8554
enebo merged 2 commits intojruby:10-devfrom
enebo:fix_arity

Conversation

@enebo
Copy link
Member

@enebo enebo commented Jan 3, 2025

The basic problem was we were not matching MRI in returning 1 for |a, **k| and instead returning -2. There was some other issue which occurred where a weird signature is not being marked as rest and messing up arity for Proc#arity. I plan on taking a stab at it in next commit but this fix is more important than that so this will land even if I cannot figure that out.

The basic problem was we were not matching MRI in returning 1 for
`|a, **k|` and instead returning -2.  There was some other issue
which occurred where a weird signature is not being marked as rest
and messing up arity for Proc#arity.  I plan on taking a stab at
it in next commit but this fix is more important than that so
this will land even if I cannot figure that out.
@enebo enebo added this to the JRuby 10.0.0.0 milestone Jan 3, 2025
I had a FIXME about this from another fix for arities and I just
followed MRIs lead here and did it the same way.  I originally had
not because the arity was wrong for execution but right for #arity.
This turned out to be because 3.4 changed how procs spread in the
presence of kwargs (previous commit fixed that).
@enebo enebo merged commit d7959af into jruby:10-dev Jan 5, 2025
54 of 72 checks passed
@enebo enebo deleted the fix_arity branch January 5, 2025 17:20
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.

1 participant