summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/parser_support.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-04-11 13:01:42 -0500
committerLuke Kanies <luke@madstop.com>2008-04-11 13:01:42 -0500
commitfb05ef3c96038d67a46eb142202af186ad6cb0b3 (patch)
tree148e8b882e5c8104c4f3fa8ecc4288e8608f812d /lib/puppet/parser/parser_support.rb
parentb49fb68f768e8b98c555ef0ae08a7bd22f5d36bd (diff)
parentb49fd495622b15f96faf944db1e70cbe9e7fe7c4 (diff)
downloadpuppet-fb05ef3c96038d67a46eb142202af186ad6cb0b3.tar.gz
puppet-fb05ef3c96038d67a46eb142202af186ad6cb0b3.tar.xz
puppet-fb05ef3c96038d67a46eb142202af186ad6cb0b3.zip
Merge branch '0.24.x'
Diffstat (limited to 'lib/puppet/parser/parser_support.rb')
-rw-r--r--lib/puppet/parser/parser_support.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb
index b86a4792b..d70722fdd 100644
--- a/lib/puppet/parser/parser_support.rb
+++ b/lib/puppet/parser/parser_support.rb
@@ -237,7 +237,9 @@ class Puppet::Parser::Parser
end
end
- return true if classes.include?(classname)
+ # We don't know whether we're looking for a class or definition, so we have
+ # to test for both.
+ return true if classes.include?(classname) || definitions.include?(classname)
unless @loaded.include?(filename)
@loaded << filename
@@ -249,7 +251,9 @@ class Puppet::Parser::Parser
# We couldn't load the file
end
end
- return classes.include?(classname)
+ # We don't know whether we're looking for a class or definition, so we have
+ # to test for both.
+ return classes.include?(classname) || definitions.include?(classname)
end
# Split an fq name into a namespace and name