summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorUwe Stuehler <ustuehler@team.mobile.de>2012-10-23 16:43:03 +0200
committerAdrien Thebo <git@somethingsinistral.net>2013-03-18 15:07:13 -0700
commit5a11279cc54e7f9f5d168c75728f990d0bd0b694 (patch)
tree9ea343c93dcf8aaf283739cb3004f5826427ddcb /lib/puppet/parser/functions
parent96e19d05f3b07a12a3a965e7d2ec90cacf25cccc (diff)
Fix number of arguments check in flatten()
The function only uses the first argument, so raise an error with too few arguments *and* with too many arguments.
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r--lib/puppet/parser/functions/flatten.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/flatten.rb b/lib/puppet/parser/functions/flatten.rb
index 781da78..a1ed183 100644
--- a/lib/puppet/parser/functions/flatten.rb
+++ b/lib/puppet/parser/functions/flatten.rb
@@ -16,7 +16,7 @@ Would return: ['a','b','c']
) do |arguments|
raise(Puppet::ParseError, "flatten(): Wrong number of arguments " +
- "given (#{arguments.size} for 1)") if arguments.size < 1
+ "given (#{arguments.size} for 1)") if arguments.size != 1
array = arguments[0]