diff options
Diffstat (limited to 'lib/puppet/parser/ast/leaf.rb')
-rw-r--r-- | lib/puppet/parser/ast/leaf.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/puppet/parser/ast/leaf.rb b/lib/puppet/parser/ast/leaf.rb index dba9812a7..d08938011 100644 --- a/lib/puppet/parser/ast/leaf.rb +++ b/lib/puppet/parser/ast/leaf.rb @@ -11,7 +11,7 @@ class Puppet::Parser::AST end def to_s - return @value + return @value.to_s unless @value.nil? end end @@ -29,6 +29,10 @@ class Puppet::Parser::AST end @value end + + def to_s + @value ? "true" : "false" + end end # The base string class. @@ -38,6 +42,10 @@ class Puppet::Parser::AST def evaluate(scope) return scope.strinterp(@value, file, line) end + + def to_s + "\"#{@value}\"" + end end # An uninterpreted string. @@ -45,6 +53,10 @@ class Puppet::Parser::AST def evaluate(scope) return @value end + + def to_s + "\"#{@value}\"" + end end # The 'default' option on case statements and selectors. |