]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Make sure that we have string-encoded integer value.
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Fri, 29 Apr 2011 17:28:38 +0000 (18:28 +0100)
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Fri, 29 Apr 2011 17:28:38 +0000 (18:28 +0100)
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
delete_at.rb

index c33f65aebb17f4272443e9562c72d144bd773d2a..1869476e019bcd4780a4f29729f015757741326a 100644 (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