Make sure that we have string-encoded integer value.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This commit is contained in:
parent
af1ba5ce8a
commit
aa2237bcb6
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ module Puppet::Parser::Functions
|
|||
|
||||
index = arguments[1]
|
||||
|
||||
if not index.match(/^\d+$/)
|
||||
if index.is_a?(String) and not index.match(/^\d+$/)
|
||||
raise(Puppet::ParseError, 'delete_at(): You must provide ' +
|
||||
'positive numeric index')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue