summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/collexpr.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/ast/collexpr.rb')
-rw-r--r--lib/puppet/parser/ast/collexpr.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/parser/ast/collexpr.rb b/lib/puppet/parser/ast/collexpr.rb
index 3e13d9400..baed325cb 100644
--- a/lib/puppet/parser/ast/collexpr.rb
+++ b/lib/puppet/parser/ast/collexpr.rb
@@ -30,7 +30,12 @@ class CollExpr < AST::Branch
case @oper
when "and": code1.call(resource) and code2.call(resource)
when "or": code1.call(resource) or code2.call(resource)
- when "==": resource[str1] == str2
+ when "==":
+ if resource[str1].is_a?(Array) && form != :exported
+ resource[str1].include?(str2)
+ else
+ resource[str1] == str2
+ end
when "!=": resource[str1] != str2
end
end