diff options
author | Ken Barber <ken@bob.sh> | 2011-07-24 00:39:17 +0100 |
---|---|---|
committer | Ken Barber <ken@bob.sh> | 2011-07-24 00:39:17 +0100 |
commit | fde64f37c98291f4a5b9ee1fcf634288e42b730a (patch) | |
tree | 8142aaf86b7d2bad9a213c1116c1ec37960c491d /lib/puppet/parser/functions/sort.rb | |
parent | 07ee33455439d960b9996e8110e011437181b42a (diff) | |
download | puppet-stdlib-fde64f37c98291f4a5b9ee1fcf634288e42b730a.tar.gz puppet-stdlib-fde64f37c98291f4a5b9ee1fcf634288e42b730a.tar.bz2 |
(#1) - fleshed out some more tests.
Diffstat (limited to 'lib/puppet/parser/functions/sort.rb')
-rw-r--r-- | lib/puppet/parser/functions/sort.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/sort.rb b/lib/puppet/parser/functions/sort.rb index 974141c..54a4018 100644 --- a/lib/puppet/parser/functions/sort.rb +++ b/lib/puppet/parser/functions/sort.rb @@ -7,11 +7,13 @@ module Puppet::Parser::Functions EOS ) do |arguments| - if (arguments.size != 0) then + if (arguments.size != 1) then raise(Puppet::ParseError, "sort(): Wrong number of arguments "+ - "given #{arguments.size} for 0") + "given #{arguments.size} for 1") end + arguments[0].sort + end end |