summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
authorAdrien Thebo <git@somethingsinistral.net>2013-08-12 10:49:47 -0700
committerAdrien Thebo <git@somethingsinistral.net>2013-08-12 10:49:47 -0700
commit32dbac004957faf5d331aa1d643570d9fba7fc45 (patch)
treef091a081d3c4fc5e7b29b0b5ce9a1b3ced392586 /lib/puppet
parent0a02295c42a8cc22db86672bf69e6f0dd7046a5c (diff)
parent77625e6d8fa48771f99c0a3c667c23a6d547017a (diff)
downloadpuppet-stdlib-32dbac004957faf5d331aa1d643570d9fba7fc45.tar.gz
puppet-stdlib-32dbac004957faf5d331aa1d643570d9fba7fc45.tar.bz2
Merge pull request #169 from hdeheer/patch-1
Fix validate_slength, arg.length should be args[0].length
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/functions/validate_slength.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/validate_slength.rb b/lib/puppet/parser/functions/validate_slength.rb
index e0ba43b..339a21d 100644
--- a/lib/puppet/parser/functions/validate_slength.rb
+++ b/lib/puppet/parser/functions/validate_slength.rb
@@ -49,7 +49,7 @@ module Puppet::Parser::Functions
case args[0]
when String
- raise Puppet::ParseError, ("validate_slength(): #{args[0].inspect} is #{args[0].length} characters. It should have been between #{min_length} and #{max_length} characters") unless args[0].length <= max_length and min_length <= arg.length
+ raise Puppet::ParseError, ("validate_slength(): #{args[0].inspect} is #{args[0].length} characters. It should have been between #{min_length} and #{max_length} characters") unless args[0].length <= max_length and min_length <= args[0].length
when Array
args[0].each do |arg|
if arg.is_a?(String)