diff options
Diffstat (limited to 'lib/puppet/parser/functions/downcase.rb')
-rw-r--r-- | lib/puppet/parser/functions/downcase.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/downcase.rb b/lib/puppet/parser/functions/downcase.rb index 4066d21..040b84f 100644 --- a/lib/puppet/parser/functions/downcase.rb +++ b/lib/puppet/parser/functions/downcase.rb @@ -12,9 +12,8 @@ Converts the case of a string or all strings in an array to lower case. "given (#{arguments.size} for 1)") if arguments.size < 1 value = arguments[0] - klass = value.class - unless [Array, String].include?(klass) + unless value.is_a?(Array) || value.is_a?(String) raise(Puppet::ParseError, 'downcase(): Requires either ' + 'array or string to work with') end |