]> gitweb.fluxo.info Git - puppet-stdlib.git/commit
Extend delete function for strings and hashes
authorJoshua Harlan Lifton <lifton@puppetlabs.com>
Sun, 18 Nov 2012 06:27:15 +0000 (22:27 -0800)
committerJeff McCune <jeff@puppetlabs.com>
Mon, 19 Nov 2012 13:44:44 +0000 (08:44 -0500)
commit7322e4dc2f8dc831097d2b0fa3768df0689acfa2
tree9c583ad535b007866573d48f2d426f5e866eed3c
parent0798059361cd79991220ff997529593a4cb43a0e
Extend delete function for strings and hashes

Previous to this commit, the delete function only acted on
arrays. This commit adds the same functionality for hashes and strings
in the obvious way: delete(h, k) would delete the k key from the h
hash and delete(s, sub) would delete all instances of the sub
substring from the s string.
lib/puppet/parser/functions/delete.rb
spec/unit/puppet/parser/functions/delete_spec.rb