summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/facter_dot_d.rb1
-rw-r--r--lib/puppet/parser/functions/is_float.rb2
-rw-r--r--lib/puppet/parser/functions/is_integer.rb2
-rw-r--r--lib/puppet/parser/functions/is_numeric.rb2
4 files changed, 3 insertions, 4 deletions
diff --git a/lib/facter/facter_dot_d.rb b/lib/facter/facter_dot_d.rb
index c43801c..3e528ab 100644
--- a/lib/facter/facter_dot_d.rb
+++ b/lib/facter/facter_dot_d.rb
@@ -94,7 +94,6 @@ class Facter::Util::DotD
cache_save!
end
else
- Puppet.deprecation_warning("TTL for external facts is being removed. See http://links.puppetlabs.com/factercaching for more information.")
Facter.debug("Using cached data for #{file}")
end
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
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
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