summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/parser_support.rb
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/parser_support.rb
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/parser_support.rb')
-rw-r--r--lib/puppet/parser/parser_support.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/parser/parser_support.rb b/lib/puppet/parser/parser_support.rb
index 853d6aa86..1583973a7 100644
--- a/lib/puppet/parser/parser_support.rb
+++ b/lib/puppet/parser/parser_support.rb
@@ -291,10 +291,14 @@ class Puppet::Parser::Parser
if tmp == ""
tmp = "main"
end
-
+
Puppet.debug addcontext("Adding code to %s" % tmp)
# Else, add our code to it.
if other.code and code
+ # promote if neededcodes to ASTArray so that we can append code
+ # ASTArray knows how to evaluate its members.
+ other.code = ast AST::ASTArray, :children => [other.code] unless other.code.is_a?(AST::ASTArray)
+ code = ast AST::ASTArray, :children => [code] unless code.is_a?(AST::ASTArray)
other.code.children += code.children
else
other.code ||= code