Skip to content

Ruby 3.3 support: add symbolize_names kwarg to MatchData#named_captures#8059

Merged
enebo merged 6 commits intojruby:9.5-devfrom
evaniainbrooks:8029-named-captures-symbolize
Jan 3, 2024
Merged

Ruby 3.3 support: add symbolize_names kwarg to MatchData#named_captures#8059
enebo merged 6 commits intojruby:9.5-devfrom
evaniainbrooks:8029-named-captures-symbolize

Conversation

@evaniainbrooks
Copy link
Contributor

issue #8029

I am unsure if my usage of keywords/checkArity/optional/checkArgumentCount is correct. I couldn't find another example exactly like this in the codebase. It seems I can still call named_captures(:bogus) without any complaints so perhaps someone can point me in the right direction.

Copy link
Member

@enebo enebo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The argument processing stuff has always been a bit tedious in JRuby. The code itself is not that complicated but it feels like we could be doing this better. Keywords in particular really need a rethink for native methods.

Just change the two things and this is in.

@enebo
Copy link
Member

enebo commented Jan 3, 2024

@evaniainbrooks I do not see my second message about argumenterror if optional arg is not a hash. Do you see that comment? I do not seem to be able to see the actual review,

@enebo enebo added this to the JRuby 9.5.0.0 milestone Jan 3, 2024
@evaniainbrooks
Copy link
Contributor Author

@evaniainbrooks I do not see my second message about argumenterror if optional arg is not a hash. Do you see that comment? I do not seem to be able to see the actual review,

I did not see it either, but no worries, I will add this now.

@enebo enebo merged commit 2a99313 into jruby:9.5-dev Jan 3, 2024
@enebo
Copy link
Member

enebo commented Jan 3, 2024

Thanks! CI is pretty weird atm. I am trying to update the parser now too so we can at least pass more.

@evaniainbrooks evaniainbrooks deleted the 8029-named-captures-symbolize branch January 26, 2026 16:08
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