Skip to content

Fix match_array to truly accept non-array#213

Merged
mcmire merged 1 commit intomainfrom
splat-match-array-args
Feb 4, 2024
Merged

Fix match_array to truly accept non-array#213
mcmire merged 1 commit intomainfrom
splat-match-array-args

Conversation

@mcmire
Copy link
Collaborator

@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 force-pushed the splat-match-array-args branch from 2974762 to 9465e9f Compare February 4, 2024 07:23
@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
@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.

1 participant