]> gitweb.fluxo.info Git - puppet-stdlib.git/commit
Allow comparisons of Numeric and number as String
authorErik Dalén <dalen@spotify.com>
Wed, 20 Mar 2013 15:36:20 +0000 (16:36 +0100)
committerAdrien Thebo <git@somethingsinistral.net>
Wed, 27 Mar 2013 21:03:31 +0000 (14:03 -0700)
commitff5dd5d75adb3723e106ca20bac4e68466395a56
tree7e2881f09efa19e7bc84e19ddfcf263e92b1627b
parent4c695ede384501b9c516cc53bdfc6b547a6e5ea2
Allow comparisons of Numeric and number as String

Puppet passes numbers as String to functions, but it makes more sense to
compare them as Numeric.
But sometimes Puppet passes them as the wrong type, see:
https://projects.puppetlabs.com/issues/19812
lib/puppet/parser/functions/max.rb
lib/puppet/parser/functions/min.rb
spec/unit/puppet/parser/functions/max_spec.rb
spec/unit/puppet/parser/functions/min_spec.rb