We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 66865f2 + 2ba5404 commit 2a78cbfCopy full SHA for 2a78cbf
lib/puppet/parser/functions/delete_values.rb
@@ -15,12 +15,11 @@ module Puppet::Parser::Functions
15
"delete_values(): Wrong number of arguments given " +
16
"(#{arguments.size} of 2)") if arguments.size != 2
17
18
- hash = arguments[0]
19
- item = arguments[1]
+ hash, item = arguments
20
21
if not hash.is_a?(Hash)
22
raise(TypeError, "delete_values(): First argument must be a Hash. " + \
23
- "Given an" " argument of class #{hash.class}.")
+ "Given an argument of class #{hash.class}.")
24
end
25
hash.delete_if { |key, val| item == val }
26
0 commit comments