diff options
author | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-29 18:28:38 +0100 |
---|---|---|
committer | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-29 18:28:38 +0100 |
commit | aa2237bcb68cf6edd5d55aa2f754d00d011d3aa5 (patch) | |
tree | faf255f8df1b215ec30a6156b0e0ed14e551adad | |
parent | af1ba5ce8a75cadf1de512ad01e6ccde0b20fd28 (diff) |
Make sure that we have string-encoded integer value.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
-rw-r--r-- | delete_at.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |