summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/scope.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/scope.rb')
-rw-r--r--lib/puppet/parser/scope.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index b792346fa..c7b36e36c 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -48,7 +48,7 @@ class Puppet::Parser::Scope
# Is the value true? This allows us to control the definition of truth
# in one place.
def self.true?(value)
- if value == false or value == ""
+ if value == false or value == "" or value == :undef
return false
else
return true
@@ -414,7 +414,11 @@ class Puppet::Parser::Scope
end
# We can't use "if @symtable[name]" here because the value might be false
if @symtable.include?(name)
- return @symtable[name]
+ if usestring and @symtable[name] == :undef
+ return ""
+ else
+ return @symtable[name]
+ end
elsif self.parent
return @parent.lookupvar(name, usestring)
elsif usestring