Make sure that we have string-encoded integer value.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This commit is contained in:
Krzysztof Wilczynski 2011-04-29 18:28:38 +01:00
parent af1ba5ce8a
commit aa2237bcb6

View file

@ -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