Skip to content

Support AST::Node#any_match_pattern_type? method #381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

koic
Copy link
Member

@koic koic commented Jun 3, 2025

This PR adds AST::Node#any_match_pattern_type?.

This method can be used to simplify multiple places where node.type?(:match_pattern, :match_pattern_p) is used, such as in the changes made in rubocop/rubocop#14224.

This PR adds `AST::Node#any_match_pattern_type?`.

This method can be used to simplify multiple places where `node.type?(:match_pattern, :match_pattern_p)` is used,
such as in the changes made in rubocop/rubocop#14224.
@koic koic force-pushed the add_any_match_pattern_type_p_to_ast_node branch from 8e67e7b to 74eb58b Compare June 3, 2025 03:47
@marcandre marcandre merged commit b2e3ef2 into rubocop:master Jun 3, 2025
22 checks passed
@marcandre
Copy link
Contributor

Nice, thank you ❤️

Released as 1.45.0

@koic koic deleted the add_any_match_pattern_type_p_to_ast_node branch June 3, 2025 17:44
koic added a commit to rubocop/rubocop that referenced this pull request Jun 4, 2025
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