[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.7-1-98-gf19c0e5
James Turnbull
james at lovedthanlost.net
Wed Apr 8 21:48:05 UTC 2009
The following commit has been merged in the master branch:
commit 7e036eb761539d58794469ecf14ee7e94d10a5fc
Author: Brice Figureau <brice-puppet at daysofwonder.com>
Date: Fri Jan 30 20:12:50 2009 +0100
Fix #1922 - Functions squash all arguments into a single hash
Revert "Fix #1682 - ASTArray should flatten product of evaluation of its children"
This reverts commit c7ccc4ba7c42d56595564491ae578a1604c628d1.
Bug #1824 and #1922 proved the fix for #1682 and #1691 was wrong.
Signed-off-by: Brice Figureau <brice-puppet at daysofwonder.com>
diff --git a/lib/puppet/parser/ast/astarray.rb b/lib/puppet/parser/ast/astarray.rb
index 0fccbca..8f09aa9 100644
--- a/lib/puppet/parser/ast/astarray.rb
+++ b/lib/puppet/parser/ast/astarray.rb
@@ -30,9 +30,10 @@ 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/spec/unit/parser/ast/astarray.rb b/spec/unit/parser/ast/astarray.rb
index f1c28ce..b3026fe 100755
--- a/spec/unit/parser/ast/astarray.rb
+++ b/spec/unit/parser/ast/astarray.rb
@@ -49,7 +49,7 @@ describe Puppet::Parser::AST::ASTArray do
operator.evaluate(@scope).should == [123]
end
- it "should flatten the results of children evaluation" do
+ it "should not flatten the results of children evaluation" do
item1 = stub "item1", :is_a? => true
item2 = stub "item2"
item2.stubs(:is_a?).with(Puppet::Parser::AST).returns(true)
@@ -59,7 +59,7 @@ describe Puppet::Parser::AST::ASTArray do
item1.expects(:safeevaluate).with(@scope).returns([123])
operator = Puppet::Parser::AST::ASTArray.new :children => [item2]
- operator.evaluate(@scope).should == [123]
+ operator.evaluate(@scope).should == [[123]]
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list