From 313df566bf5cfcbef73fc8182ccb07ddf2f13feb Mon Sep 17 00:00:00 2001 From: Ken Barber Date: Thu, 28 Jul 2011 21:03:33 +0100 Subject: (#2) unstub is_numeric function. --- lib/puppet/parser/functions/is_numeric.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/puppet/parser') 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 -- cgit v1.2.3