From a773281760469f2b104c89b2bfb760c0e3013422 Mon Sep 17 00:00:00 2001 From: stephen Date: Thu, 3 Jan 2013 14:05:29 +0000 Subject: Add test/validation for is_float if created from an arithmetical operation --- lib/puppet/parser/functions/is_float.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/parser/functions/is_float.rb') 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 -- cgit v1.2.3