diff options
Diffstat (limited to 'lib/puppet/parser/functions/str2bool.rb')
-rw-r--r-- | lib/puppet/parser/functions/str2bool.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/str2bool.rb b/lib/puppet/parser/functions/str2bool.rb index 9ea6dd5..446732e 100644 --- a/lib/puppet/parser/functions/str2bool.rb +++ b/lib/puppet/parser/functions/str2bool.rb @@ -4,7 +4,7 @@ module Puppet::Parser::Functions newfunction(:str2bool, :type => :rvalue, :doc => <<-EOS -This converts a string to a boolean. This attempt to convert strings that +This converts a string to a boolean. This attempt to convert strings that contain things like: y, 1, t, true to 'true' and strings that contain things like: 0, f, n, false, no to 'false'. EOS @@ -14,7 +14,7 @@ like: 0, f, n, false, no to 'false'. "given (#{arguments.size} for 1)") if arguments.size < 1 string = arguments[0] - + # If string is already Boolean, return it if !!string == string return string |