Skip to content
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

Fix match_array to truly accept non-array #213

Merged
merged 1 commit into from
Feb 4, 2024
Merged

Conversation

mcmire
Copy link
Owner

@mcmire mcmire commented Feb 4, 2024

Previously, it was noticed that match_array raised an error when given a single, non-array argument as opposed to an array (which is the documented usage). An attempt was made to fix this; however, the conditional added to match_array only checked that the single argument was a string. This commit matches the original implementation of match_array by accepting any type of non-array, not just a string.


Also see: #97

Recreation of: #135 (hat tip: @wata727)

Previously, it was noticed that `match_array` raised an error when given
a single, non-array argument as opposed to an array (which is the
documented usage). An attempt was made to fix this; however, the
conditional added to `match_array` only checked that the single argument
was a string. This commit matches the original implementation of
`match_array` by accepting any type of non-array, not just a string.

Co-authored-by: wata_mac <watassbass@gmail.com>
@mcmire mcmire changed the title Fix match_array to accept non-array Fix match_array to truly accept non-array Feb 4, 2024
@mcmire mcmire merged commit d144751 into main Feb 4, 2024
40 checks passed
@mcmire mcmire deleted the splat-match-array-args branch February 4, 2024 07:25
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.

None yet

1 participant