Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor corrections to delete_values() #170

Merged
merged 1 commit into from Aug 13, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/puppet/parser/functions/delete_values.rb
Expand Up @@ -15,12 +15,11 @@ module Puppet::Parser::Functions
"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
Expand Down