From 65f601a99a0ca7ebacfda7a6becd8af9fe9eaacb Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Wed, 11 Nov 2009 23:22:03 -0800 Subject: Fixing 2806 Specifying multiple tags fails to apply any of them Fix code that was passing an Array of code to a method that was expecting a single tag. Includes Markus's suggestions Signed-off-by: Jesse Wolfe --- lib/puppet/util/tagging.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/puppet/util') diff --git a/lib/puppet/util/tagging.rb b/lib/puppet/util/tagging.rb index f421d18d8..03a8b8a9a 100644 --- a/lib/puppet/util/tagging.rb +++ b/lib/puppet/util/tagging.rb @@ -21,8 +21,8 @@ module Puppet::Util::Tagging end # Are we tagged with the provided tag? - def tagged?(tag) - defined?(@tags) and @tags.include?(tag.to_s) + def tagged?(*tags) + not ( self.tags & tags.flatten.collect { |t| t.to_s } ).empty? end # Return a copy of the tag list, so someone can't ask for our tags -- cgit