(GH-143) Handle order insensitive arrays in the same? method of the DSC Base Provider
#148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this PR, a typo in the case statement of the
same?method in the DSC Base Provider caused the Hash and Array cases never to run, always falling back on a simple==value comparison.This caused arrays which were the same except for ordering to always fail, as
==comparisons of arrays are order sensitive.This PR corrects the typo, ensuring that the Array case runs. This only handles order insensitivity of arrays which have no nested values.
A future PR will be required to deeply sort arrays and hashes - see #144 for further details.
This PR also comments out the Hash case, which otherwise errors. This preserves existing behavior for Hashes, causing them to be compared with
==, which is order insensitive for keys but not for array values (this also will be resolved when #144 is implemented.same?in the DSC Base provider does not handle order-insensitive array comparisons #143