delete_values() fix bug #20681.#182
Conversation
lmello
commented
Sep 16, 2013
|
Thank you very much for this contribution! This looks great, but before we merge this I would like the commit message to match our project conventions. Once that's addressed we can merge this in. Housekeeping - Commit MessageIt would be good to have the commit message amended a little. The first line of the commit should have the issue number and a description of the problem or fix, and the body of the commit message should explain what is this existing behavior and how this change fixes it. We have a more complete explanation of this at https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md#making-changes . |
|
Thanks for the explanation. i will change that tomorrow! :-) |
The issue #20681 describe the error of delete() function removing the elements from the origin array/hash/string. This issue affected other delete functions. Because ruby delete and delete_if functions make destructive changes to the origin array/hash. The delete_undef_values removed elements from the origin hash and this is not the desired behaviour. To solve this, we should dup or clone the hash before using the delete or delete_if ruby functions. This fix the problem and add unit tests, so we could enforce this behaviour and prevent regressions.
delete_values() fix bug #20681.
|
summary: merged into master in 1011670; thanks for the contribution! |
|
Thanks ! |