summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-10-31 16:01:28 -0500
committerLuke Kanies <luke@madstop.com>2008-10-31 16:01:28 -0500
commite76cac7df102389b7ee487be4031caf0e7e2ab04 (patch)
tree0b9bd8d260613a5b41d9c72fa984065e5cb2d5f4 /lib/puppet/parser/ast
parent801b8a643d353176675023adaa25f26d0ec67403 (diff)
parentf0635179b60f5cf30d1f7070f4c3c998ad5131c0 (diff)
downloadpuppet-e76cac7df102389b7ee487be4031caf0e7e2ab04.tar.gz
puppet-e76cac7df102389b7ee487be4031caf0e7e2ab04.tar.xz
puppet-e76cac7df102389b7ee487be4031caf0e7e2ab04.zip
Merge branch '0.24.x'
Conflicts: CHANGELOG
Diffstat (limited to 'lib/puppet/parser/ast')
-rw-r--r--lib/puppet/parser/ast/astarray.rb3
-rw-r--r--lib/puppet/parser/ast/hostclass.rb7
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/puppet/parser/ast/astarray.rb b/lib/puppet/parser/ast/astarray.rb
index 8f09aa922..0fccbca75 100644
--- a/lib/puppet/parser/ast/astarray.rb
+++ b/lib/puppet/parser/ast/astarray.rb
@@ -30,10 +30,9 @@ class Puppet::Parser::AST
items << child
end
}
-
rets = items.flatten.collect { |child|
child.safeevaluate(scope)
- }
+ }.flatten
return rets.reject { |o| o.nil? }
end
diff --git a/lib/puppet/parser/ast/hostclass.rb b/lib/puppet/parser/ast/hostclass.rb
index 7f89f8151..4f5c4797c 100644
--- a/lib/puppet/parser/ast/hostclass.rb
+++ b/lib/puppet/parser/ast/hostclass.rb
@@ -56,7 +56,12 @@ class Puppet::Parser::AST::HostClass < Puppet::Parser::AST::Definition
# Don't create a subscope for the top-level class, since it already
# has its own scope.
- scope = subscope(scope, resource) unless resource.title == :main
+ unless resource.title == :main
+ scope = subscope(scope, resource)
+
+ scope.setvar("title", resource.title)
+ scope.setvar("name", resource.name)
+ end
# Add the parent scope namespaces to our own.
if pnames