diff options
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r-- | lib/puppet/parser/functions/delete_values.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/delete_values.rb b/lib/puppet/parser/functions/delete_values.rb index 17b9d37..ca8eef5 100644 --- a/lib/puppet/parser/functions/delete_values.rb +++ b/lib/puppet/parser/functions/delete_values.rb @@ -21,6 +21,6 @@ Would return: {'a'=>'A','c'=>'C','B'=>'D'} raise(TypeError, "delete_values(): First argument must be a Hash. " + \ "Given an argument of class #{hash.class}.") end - hash.delete_if { |key, val| item == val } + hash.dup.delete_if { |key, val| item == val } end end |