From 06fc40c5d755a41c8ece84a3d437572a64b4c899 Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Mon, 19 Jul 2010 12:32:46 -0700 Subject: [#4269] Undef variables interpolate to empty string This fixes double-quoted strings to interpolate undef variables as an empty string. This is the behavior present in 0.25.x. --- lib/puppet/parser/ast/leaf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/ast/leaf.rb b/lib/puppet/parser/ast/leaf.rb index db9788f50..49cde63ca 100644 --- a/lib/puppet/parser/ast/leaf.rb +++ b/lib/puppet/parser/ast/leaf.rb @@ -63,7 +63,7 @@ class Puppet::Parser::AST class Concat < AST::Leaf def evaluate(scope) - @value.collect { |x| x.evaluate(scope) }.join + @value.collect { |x| x.evaluate(scope) }.collect{ |x| x == :undef ? '' : x }.join end def to_s -- cgit