diff options
Diffstat (limited to 'str2bool.rb')
-rw-r--r-- | str2bool.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/str2bool.rb b/str2bool.rb index 02b5aae..5a52f25 100644 --- a/str2bool.rb +++ b/str2bool.rb @@ -12,11 +12,12 @@ module Puppet::Parser::Functions string = arguments[0] - if not string.is_a?(String) - raise(Puppet::ParseError, 'str2bool(): Requires either a ' + + unless string.is_a?(String) + raise(Puppet::ParseError, 'str2bool(): Requires either ' + 'string to work with') end + # We consider all the yes, no, y, n and so on too ... result = case string # # This is how undef looks like in Puppet ... |