summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/is_float.rb
diff options
context:
space:
mode:
authorstephen <stephen@puppetlabs.com>2013-01-03 14:05:29 +0000
committerJeff McCune <jeff@puppetlabs.com>2013-01-03 13:37:55 -0800
commita773281760469f2b104c89b2bfb760c0e3013422 (patch)
tree12d5f80efdcf54f1d3e1731b20777d3b1097c43c /lib/puppet/parser/functions/is_float.rb
parentb86f5dc1293ad431581afbb8f294560f3cf34d43 (diff)
downloadpuppet-stdlib-a773281760469f2b104c89b2bfb760c0e3013422.tar.gz
puppet-stdlib-a773281760469f2b104c89b2bfb760c0e3013422.tar.bz2
Add test/validation for is_float if created from an arithmetical operation
Diffstat (limited to 'lib/puppet/parser/functions/is_float.rb')
-rw-r--r--lib/puppet/parser/functions/is_float.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/is_float.rb b/lib/puppet/parser/functions/is_float.rb
index 2fc05ba..911f3c2 100644
--- a/lib/puppet/parser/functions/is_float.rb
+++ b/lib/puppet/parser/functions/is_float.rb
@@ -15,7 +15,7 @@ Returns true if the variable passed to this function is a float.
value = arguments[0]
- if value != value.to_f.to_s then
+ if value != value.to_f.to_s and !value.is_a? Float then
return false
else
return true