summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorTP Honey <tphoney@users.noreply.github.com>2016-06-30 09:55:49 +0100
committerGitHub <noreply@github.com>2016-06-30 09:55:49 +0100
commit70d543e66a9a0fdc670004784f4864e7a04dc4dc (patch)
tree450f264f6fb674a7c4be7073e98c334f11a54b9b /lib/puppet/parser/functions
parent50cf8bd5b77ba6353ab6477c4c76f437b834b6b0 (diff)
parentaf875b11ff284cfe2ea95d208a614576a4342b2c (diff)
Merge pull request #614 from DavidS/MODULES-3543-fix-defined_with_params
(MODULES-3543) Fix define_with_params to handle undef properly
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r--lib/puppet/parser/functions/defined_with_params.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/defined_with_params.rb b/lib/puppet/parser/functions/defined_with_params.rb
index d7df306..ffc7241 100644
--- a/lib/puppet/parser/functions/defined_with_params.rb
+++ b/lib/puppet/parser/functions/defined_with_params.rb
@@ -26,7 +26,7 @@ ENDOFDOC
ret = false
if resource = findresource(reference.to_s)
matches = params.collect do |key, value|
- resource[key] == value
+ resource[key] == (value.eql?(:undef) ? nil : value) # eql? avoids bugs caused by monkeypatching in puppet
end
ret = params.empty? || !matches.include?(false)
end