From 311aba94792c2984d2944c9ac99a4ff5d79db697 Mon Sep 17 00:00:00 2001 From: luke Date: Sat, 23 Dec 2006 05:05:58 +0000 Subject: Fixing #66. The "defined" function previously checked for definitions and types, but since types and classes can't have the same name anyway, the function now works for classes. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1965 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/parser/functions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/functions.rb b/lib/puppet/parser/functions.rb index ad5f53080..854f3ac9f 100644 --- a/lib/puppet/parser/functions.rb +++ b/lib/puppet/parser/functions.rb @@ -153,7 +153,7 @@ module Functions newfunction(:defined, :type => :rvalue, :doc => "Determine whether a given type is defined, either as a native type or a defined type.") do |vals| # For some reason, it doesn't want me to return from here. - if vals.detect do |val| Puppet::Type.type(val) or finddefine(val) end + if vals.detect do |val| Puppet::Type.type(val) or finddefine(val) or findclass(val) end true else false -- cgit