Issue #20681 has been reported by c sights.

----------------------------------------
Bug #20681: delete() also deletes element from original list.
https://projects.puppetlabs.com/issues/20681

* Author: c sights
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* Affected Puppet version: 3.1.1
* Keywords: 
* Branch: 
----------------------------------------
The setup: list with 3 elements, delete one:
  $test_list = ['a', 'b', 'c']
  $test_deleted = delete($test_list, 'a')

Print out the elements in 'test_deleted':
        notify { 'group_output2':
                withpath => true,
                name     => "$cfeng::test_deleted",
        }
Notice: /Stage[main]/Syslog/Notify[group_output2]/message: bc

Good!  Run-on output shows that 'a' was deleted


Print out the elements in 'test_list':
        notify { 'group_output1':
                withpath => true,
                name     => "$cfeng::test_list",
        }
Notice: /Stage[main]/Syslog/Notify[group_output1]/message: bc

WHAT!?  'a' was deleted from 'test_list' as well!  Expected abc as output!





-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to