diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-03 05:57:52 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-03 05:57:52 +0000 |
commit | 44f15795d5cc1d5c4cd43b585441212d75d25c81 (patch) | |
tree | 12eda01827c172e59dbcd6a6958ebf501b0ba47a /lib/puppet/parser/ast | |
parent | a9df49d3ee02ed11b82107ea035b9089ca7a2a56 (diff) | |
download | puppet-44f15795d5cc1d5c4cd43b585441212d75d25c81.tar.gz puppet-44f15795d5cc1d5c4cd43b585441212d75d25c81.tar.xz puppet-44f15795d5cc1d5c4cd43b585441212d75d25c81.zip |
Fixing a stupid bug i managed to introduce in 0.16.2 (probably) involving importing files with classes in them. This is a better solution than what I had before the bug, anyway. Also, some documentation fixes.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1167 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/ast')
-rw-r--r-- | lib/puppet/parser/ast/astarray.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/puppet/parser/ast/astarray.rb b/lib/puppet/parser/ast/astarray.rb index f8f88b816..ab24fa86c 100644 --- a/lib/puppet/parser/ast/astarray.rb +++ b/lib/puppet/parser/ast/astarray.rb @@ -35,7 +35,24 @@ class Puppet::Parser::AST definers = [] settors = [] others = [] + + # Make a new array, so we don't have to deal with the details of + # flattening and such + items = [] + + # First clean out any AST::ASTArrays @children.each { |child| + if child.instance_of?(AST::ASTArray) + child.each do |ac| + items << ac + end + else + items << child + end + } + + # Now sort them all according to the type of action + items.each { |child| if definelist.include?(child.class) definers << child elsif setlist.include?(child.class) |