Mercurial > repos > other > Puppet
diff modules/stdlib/lib/puppet/parser/functions/shuffle.rb @ 37:addb0ea390a1 puppet-3.6
Update Puppet "stdlib" module
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 14 Mar 2015 20:09:45 +0000 |
parents | 956e484adc12 |
children | c42fb28cff86 |
line wrap: on
line diff
--- a/modules/stdlib/lib/puppet/parser/functions/shuffle.rb Sat Mar 14 20:07:04 2015 +0000 +++ b/modules/stdlib/lib/puppet/parser/functions/shuffle.rb Sat Mar 14 20:09:45 2015 +0000 @@ -12,9 +12,8 @@ "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, 'shuffle(): Requires either ' + 'array or string to work with') end