splitwise / super_diff

A more helpful way to view differences between complex data structures in RSpec.
https://splitwise.github.io/super_diff/
MIT License
986 stars 53 forks source link

Fix match_array to truly accept non-array #213

Closed mcmire closed 9 months ago

mcmire commented 9 months ago

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: https://github.com/mcmire/super_diff/issues/97

Recreation of: https://github.com/mcmire/super_diff/pull/135 (hat tip: @wata727)