summaryrefslogtreecommitdiff
path: root/lib/puppet/parser
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/functions/is_numeric.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/is_numeric.rb b/lib/puppet/parser/functions/is_numeric.rb
index 96e8674..c2c0fb5 100644
--- a/lib/puppet/parser/functions/is_numeric.rb
+++ b/lib/puppet/parser/functions/is_numeric.rb
@@ -12,6 +12,14 @@ module Puppet::Parser::Functions
"given #{arguments.size} for 1")
end
+ value = arguments[0]
+
+ if value == value.to_f.to_s or value == value.to_i.to_s then
+ return true
+ else
+ return false
+ end
+
end
end