diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-23 05:05:58 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-23 05:05:58 +0000 |
commit | 311aba94792c2984d2944c9ac99a4ff5d79db697 (patch) | |
tree | b497a94947be18a63bf35796654cc468fcc36bb5 /lib/puppet/parser/functions.rb | |
parent | 9bb5c50d0b30b4dfb82b6b705dfcbf0e126a9d61 (diff) | |
download | puppet-311aba94792c2984d2944c9ac99a4ff5d79db697.tar.gz puppet-311aba94792c2984d2944c9ac99a4ff5d79db697.tar.xz puppet-311aba94792c2984d2944c9ac99a4ff5d79db697.zip |
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
Diffstat (limited to 'lib/puppet/parser/functions.rb')
-rw-r--r-- | lib/puppet/parser/functions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |