summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/is_float.rb
diff options
context:
space:
mode:
authorJeff McCune <jeff@puppetlabs.com>2013-01-03 13:38:16 -0800
committerJeff McCune <jeff@puppetlabs.com>2013-01-03 13:38:16 -0800
commitbc4abce86b07a97ec9d17ee105266c1260a9a1c8 (patch)
tree12d5f80efdcf54f1d3e1731b20777d3b1097c43c /lib/puppet/parser/functions/is_float.rb
parente1f2a932883c71038d78938efd46cdb30c01da6d (diff)
parenta773281760469f2b104c89b2bfb760c0e3013422 (diff)
downloadpuppet-stdlib-bc4abce86b07a97ec9d17ee105266c1260a9a1c8.tar.gz
puppet-stdlib-bc4abce86b07a97ec9d17ee105266c1260a9a1c8.tar.bz2
Merge branch 'stephenrjohnson-bug/3.x/18157_arithmetical_operations' into 3.2.x
* stephenrjohnson-bug/3.x/18157_arithmetical_operations: Add test/validation for is_float if created from an arithmetical operation Add test/validation for is_integer if created from an arithmetical operation Add test/validation for is_numeric 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