summaryrefslogtreecommitdiffstats
path: root/spec/unit/util/autoload.rb
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-02-05 19:59:18 +0100
committerJames Turnbull <james@lovedthanlost.net>2009-02-11 08:53:13 +1100
commitb22d148e6d6eb36c9b02a58dc0c04c9650d5207b (patch)
tree1712b24353ae2299b8f9941e63f6dd29251a0cc8 /spec/unit/util/autoload.rb
parent6331bfc9b6dc5140147730b3c4f79fef35265a94 (diff)
downloadpuppet-b22d148e6d6eb36c9b02a58dc0c04c9650d5207b.tar.gz
puppet-b22d148e6d6eb36c9b02a58dc0c04c9650d5207b.tar.xz
puppet-b22d148e6d6eb36c9b02a58dc0c04c9650d5207b.zip
Fix #1691 - Realize fails with array of Resource References
The following snippet: realize( File["/tmp/a","/tmp/b"] ) is parsed into: AST::Function @name=realize @arguments= AST::ASTArray @children = [ AST::ResourceReference @title= AST::ASTArray @children = [ String(/tmp/a), String(/tmp/b) ] ] When evaluated: ResourceReference gives -> [ File[/tmp/a], File[/tmp/b] ] which means the function arguments are: [[File[/tmp/a], File[/tmp/b]] after evaluating the @arguments ASTArray of AST::Functions. Then the collector complains that it can't find the resource because it is not supposed to work on non-flattened resource array. The fix is to flatten in the realize function (although it can be done more generally in the AST::Function evaluation) before the resources are given to the Collector. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec/unit/util/autoload.rb')
0 files changed, 0 insertions, 0 deletions