summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/functions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/functions.rb')
-rw-r--r--lib/puppet/parser/functions.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/puppet/parser/functions.rb b/lib/puppet/parser/functions.rb
index 61070627f..63201924b 100644
--- a/lib/puppet/parser/functions.rb
+++ b/lib/puppet/parser/functions.rb
@@ -91,11 +91,15 @@ module Functions
newfunction(:tagged, :rvalue) do |vals|
classlist = self.classlist
- if vals.find do |val| ! classlist.include?(val) end
- return false
- else
- return true
+ retval = true
+ vals.each do |val|
+ unless classlist.include?(val) or self.tags.include?(val)
+ retval = false
+ break
+ end
end
+
+ return retval
end
# Test whether a given class or definition is defined