summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdrien Thebo <git@somethingsinistral.net>2013-08-13 10:27:42 -0700
committerAdrien Thebo <git@somethingsinistral.net>2013-08-13 10:27:42 -0700
commit2a78cbfaad2acc61d6d8bab715db00c9890adbd7 (patch)
tree6bcb2eb4b51f872e857de4ab403dadfaf244eec8 /lib
parent66865f2c722e56d3ef34e2b68f20ee1953f9645e (diff)
parent2ba5404b16911c6a926e66a5efbe0b164cb6b658 (diff)
Merge pull request #170 from ptomulik/fix_delete_values
minor corrections to delete_values()
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/parser/functions/delete_values.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/puppet/parser/functions/delete_values.rb b/lib/puppet/parser/functions/delete_values.rb
index 2fcbd16..17b9d37 100644
--- a/lib/puppet/parser/functions/delete_values.rb
+++ b/lib/puppet/parser/functions/delete_values.rb
@@ -15,12 +15,11 @@ Would return: {'a'=>'A','c'=>'C','B'=>'D'}
"delete_values(): Wrong number of arguments given " +
"(#{arguments.size} of 2)") if arguments.size != 2
- hash = arguments[0]
- item = arguments[1]
+ hash, item = arguments
if not hash.is_a?(Hash)
raise(TypeError, "delete_values(): First argument must be a Hash. " + \
- "Given an" " argument of class #{hash.class}.")
+ "Given an argument of class #{hash.class}.")
end
hash.delete_if { |key, val| item == val }
end