summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/is_string.rb
diff options
context:
space:
mode:
authorKen Barber <ken@bob.sh>2011-07-29 20:11:47 +0100
committerKen Barber <ken@bob.sh>2011-07-29 20:11:47 +0100
commit18e5302614bce168ac07e35dc23b058064e9e41c (patch)
treeb45471bdb3846efa835ed394dd1e891620b86e54 /lib/puppet/parser/functions/is_string.rb
parent56a402e6542105ec63c5071e685d5af93fd4d0f3 (diff)
(#2) fix is_string finally so it also makes sure numbers return false.
Diffstat (limited to 'lib/puppet/parser/functions/is_string.rb')
-rw-r--r--lib/puppet/parser/functions/is_string.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/is_string.rb b/lib/puppet/parser/functions/is_string.rb
index 61037e3..8a02a10 100644
--- a/lib/puppet/parser/functions/is_string.rb
+++ b/lib/puppet/parser/functions/is_string.rb
@@ -14,6 +14,10 @@ module Puppet::Parser::Functions
result = type.is_a?(String)
+ if result and (type == type.to_f.to_s or type == type.to_i.to_s) then
+ return false
+ end
+
return result
end
end