summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/astarray.rb
diff options
context:
space:
mode:
authorBlake Barnett <bdb@bdb-debvm1.stanford.edu>2008-02-28 22:54:12 -0800
committerBlake Barnett <bdb@bdb-debvm1.stanford.edu>2008-02-28 22:54:12 -0800
commit5d3dd9e718cbe69b2fe7f37bc3ec422c88a1080b (patch)
tree787bf2a1a6833a2d7e1f5ae9f9d4e4dfdeb91139 /lib/puppet/parser/ast/astarray.rb
parent0139889be92add151e624710261ef6f8c0048586 (diff)
parent65b72676aef2d58314f546eb31780d1b9925b9b3 (diff)
downloadpuppet-5d3dd9e718cbe69b2fe7f37bc3ec422c88a1080b.tar.gz
puppet-5d3dd9e718cbe69b2fe7f37bc3ec422c88a1080b.tar.xz
puppet-5d3dd9e718cbe69b2fe7f37bc3ec422c88a1080b.zip
Merge branch '0.24.x' of git://reductivelabs.com/puppet into 0.24.x
Diffstat (limited to 'lib/puppet/parser/ast/astarray.rb')
-rw-r--r--lib/puppet/parser/ast/astarray.rb24
1 files changed, 3 insertions, 21 deletions
diff --git a/lib/puppet/parser/ast/astarray.rb b/lib/puppet/parser/ast/astarray.rb
index b66fd6bba..8f09aa922 100644
--- a/lib/puppet/parser/ast/astarray.rb
+++ b/lib/puppet/parser/ast/astarray.rb
@@ -16,16 +16,6 @@ class Puppet::Parser::AST
# Evaluate our children.
def evaluate(scope)
- rets = nil
- # We basically always operate declaratively, and when we
- # do we need to evaluate the settor-like statements first. This
- # is basically variable and type-default declarations.
- # This is such a stupid hack. I've no real idea how to make a
- # "real" declarative language, so I hack it so it looks like
- # one, yay.
- settors = []
- others = []
-
# Make a new array, so we don't have to deal with the details of
# flattening and such
items = []
@@ -34,22 +24,14 @@ class Puppet::Parser::AST
@children.each { |child|
if child.instance_of?(AST::ASTArray)
child.each do |ac|
- if ac.class.settor?
- settors << ac
- else
- others << ac
- end
+ items << ac
end
else
- if child.class.settor?
- settors << child
- else
- others << child
- end
+ items << child
end
}
- rets = [settors, others].flatten.collect { |child|
+ rets = items.flatten.collect { |child|
child.safeevaluate(scope)
}
return rets.reject { |o| o.nil? }