]> gitweb.fluxo.info Git - puppet-stdlib.git/commit
validate_integer, validate_numeric: explicitely reject hashes in arrays
authorDavid Schmitt <david.schmitt@puppetlabs.com>
Wed, 27 May 2015 19:05:01 +0000 (20:05 +0100)
committerDavid Schmitt <david.schmitt@puppetlabs.com>
Wed, 27 May 2015 19:05:05 +0000 (20:05 +0100)
commitcf9f7a6b7e4ede7edd612fde33f7149f9c7f3385
tree45e3ea607843a0ec02670cb5172d2951ac46dc50
parentb4090184c76666e58694aa4f09a39be009a42f5f
validate_integer, validate_numeric: explicitely reject hashes in arrays

Without this patch, Ruby 1.8's Hash#to_s behaviour causes [{1=>2}] to be
treated as "12" when validating values.
lib/puppet/parser/functions/validate_integer.rb
lib/puppet/parser/functions/validate_numeric.rb
spec/functions/validate_integer_spec.rb
spec/functions/validate_numeric_spec.rb