X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fshuffle.rb;fp=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fshuffle.rb;h=942cbceab86bd5230a2f9fd0c8aa68313280ed9a;hb=6963202b4b62c2816655ac9532521b018fdf83bd;hp=30c663dbe18d726eb371a1c03f7db4deb0b5cc2c;hpb=a69999e580f8b3abd12446c2d6ad59e517651813;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/shuffle.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/shuffle.rb index 30c663dbe..942cbceab 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/shuffle.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/shuffle.rb @@ -8,14 +8,12 @@ Randomizes the order of a string or array elements. EOS ) do |arguments| - raise(Puppet::ParseError, "shuffle(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 + raise(Puppet::ParseError, "shuffle(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1 value = arguments[0] unless value.is_a?(Array) || value.is_a?(String) - raise(Puppet::ParseError, 'shuffle(): Requires either ' + - 'array or string to work with') + raise(Puppet::ParseError, 'shuffle(): Requires either array or string to work with') end result = value.clone