diff options
author | TP Honey <tphoney@users.noreply.github.com> | 2015-05-28 13:29:43 +0100 |
---|---|---|
committer | TP Honey <tphoney@users.noreply.github.com> | 2015-05-28 13:29:43 +0100 |
commit | c9b810cf365cbc4f87dfcee8b4eedf0b055e3569 (patch) | |
tree | 45e3ea607843a0ec02670cb5172d2951ac46dc50 /lib/puppet/parser/functions/validate_integer.rb | |
parent | b4090184c76666e58694aa4f09a39be009a42f5f (diff) | |
parent | cf9f7a6b7e4ede7edd612fde33f7149f9c7f3385 (diff) | |
download | puppet-stdlib-c9b810cf365cbc4f87dfcee8b4eedf0b055e3569.tar.gz puppet-stdlib-c9b810cf365cbc4f87dfcee8b4eedf0b055e3569.tar.bz2 |
Merge pull request #461 from DavidS/validate-hashes
validate_integer, validate_numeric: explicitely reject hashes in arrays
Diffstat (limited to 'lib/puppet/parser/functions/validate_integer.rb')
-rw-r--r-- | lib/puppet/parser/functions/validate_integer.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/validate_integer.rb b/lib/puppet/parser/functions/validate_integer.rb index 995f8db..95da0c4 100644 --- a/lib/puppet/parser/functions/validate_integer.rb +++ b/lib/puppet/parser/functions/validate_integer.rb @@ -109,6 +109,7 @@ module Puppet::Parser::Functions # check every element of the array input.each_with_index do |arg, pos| begin + raise TypeError if arg.is_a?(Hash) arg = Integer(arg.to_s) validator.call(arg) rescue TypeError, ArgumentError |