From 190b9438c58eab2322bdf216be1aaae109d14072 Mon Sep 17 00:00:00 2001
From: stephen <stephen@puppetlabs.com>
Date: Thu, 3 Jan 2013 13:53:03 +0000
Subject: Add test/validation for is_numeric if created from an arithmetical
 operation

---
 lib/puppet/parser/functions/is_numeric.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lib/puppet')

diff --git a/lib/puppet/parser/functions/is_numeric.rb b/lib/puppet/parser/functions/is_numeric.rb
index ce13ece..abf0321 100644
--- a/lib/puppet/parser/functions/is_numeric.rb
+++ b/lib/puppet/parser/functions/is_numeric.rb
@@ -15,7 +15,7 @@ Returns true if the variable passed to this function is a number.
 
     value = arguments[0]
 
-    if value == value.to_f.to_s or value == value.to_i.to_s then
+    if value == value.to_f.to_s or value == value.to_i.to_s or value.is_a? Numeric then
       return true
     else
       return false
-- 
cgit v1.2.3


From b86f5dc1293ad431581afbb8f294560f3cf34d43 Mon Sep 17 00:00:00 2001
From: stephen <stephen@puppetlabs.com>
Date: Thu, 3 Jan 2013 14:02:58 +0000
Subject: Add test/validation for is_integer if created from an arithmetical
 operation

---
 lib/puppet/parser/functions/is_integer.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lib/puppet')

diff --git a/lib/puppet/parser/functions/is_integer.rb b/lib/puppet/parser/functions/is_integer.rb
index 8ee34f6..6b29e98 100644
--- a/lib/puppet/parser/functions/is_integer.rb
+++ b/lib/puppet/parser/functions/is_integer.rb
@@ -15,7 +15,7 @@ Returns true if the variable returned to this string is an integer.
 
     value = arguments[0]
 
-    if value != value.to_i.to_s then
+    if value != value.to_i.to_s and !value.is_a? Fixnum then
       return false
     else
       return true
-- 
cgit v1.2.3


From a773281760469f2b104c89b2bfb760c0e3013422 Mon Sep 17 00:00:00 2001
From: stephen <stephen@puppetlabs.com>
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')

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