Skip to content

(MODULES-3246) Fix concat with Hash arguments. #590

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
merged 1 commit into from
Apr 11, 2016

Conversation

alext
Copy link
Contributor

@alext alext commented Apr 8, 2016

85d5ead Updated the concat function so that it wouldn't modify the
original array. A side-effect of this change is that it now always calls
Array() on the second argument. If thit is a Hash, this results in
to_a being called on the hash, which converts it to an array or
tuples. This is undesired.

Update the behaviour so that it doesn't (indirectly) call to_a on
anything, instead test for the type of the argument, wrapping it in an
array if it's not already an array.

85d5ead Updated the concat function so that it wouldn't modify the
original array. A side-effect of this change is that it now always calls
`Array()` on the second argument. If thit is a Hash, this results in
`to_a` being called on the hash, which converts it to an array or
tuples. This is undesired.

Update the behaviour so that it doesn't (indirectly) call `to_a` on
anything, instead test for the type of the argument, wrapping it in an
array if it's not already an array.
@hunner hunner merged commit e3a6e2c into puppetlabs:master Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants