summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorHubert <h.deheer@gmail.com>2013-08-08 12:56:12 +0200
committerHubert <h.deheer@gmail.com>2013-08-08 12:56:12 +0200
commit77625e6d8fa48771f99c0a3c667c23a6d547017a (patch)
treef091a081d3c4fc5e7b29b0b5ce9a1b3ced392586 /lib/puppet/parser/functions
parent0a02295c42a8cc22db86672bf69e6f0dd7046a5c (diff)
downloadpuppet-stdlib-77625e6d8fa48771f99c0a3c667c23a6d547017a.tar.gz
puppet-stdlib-77625e6d8fa48771f99c0a3c667c23a6d547017a.tar.bz2
Fix validate_slength, arg.length should be args[0].length
During a puppet run an error will be thrown and a puppet run will fail completely (when using validate_slength): undefined local variable or method `arg' for #<Puppet::Parser::Scope:0x7f243c236948>
Diffstat (limited to 'lib/puppet/parser/functions')
-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)