From: Krzysztof Wilczynski Date: Fri, 29 Apr 2011 17:28:38 +0000 (+0100) Subject: Make sure that we have string-encoded integer value. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=aa2237bcb68cf6edd5d55aa2f754d00d011d3aa5;p=puppet-stdlib.git Make sure that we have string-encoded integer value. Signed-off-by: Krzysztof Wilczynski --- diff --git a/delete_at.rb b/delete_at.rb index c33f65a..1869476 100644 --- a/delete_at.rb +++ b/delete_at.rb @@ -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