diff options
author | Adrien Thebo <git@somethingsinistral.net> | 2013-08-12 10:49:47 -0700 |
---|---|---|
committer | Adrien Thebo <git@somethingsinistral.net> | 2013-08-12 10:49:47 -0700 |
commit | 32dbac004957faf5d331aa1d643570d9fba7fc45 (patch) | |
tree | f091a081d3c4fc5e7b29b0b5ce9a1b3ced392586 /lib | |
parent | 0a02295c42a8cc22db86672bf69e6f0dd7046a5c (diff) | |
parent | 77625e6d8fa48771f99c0a3c667c23a6d547017a (diff) | |
download | puppet-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')
-rw-r--r-- | lib/puppet/parser/functions/validate_slength.rb | 2 |
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) |