diff options
author | Ken Barber <ken@bob.sh> | 2011-07-29 20:11:47 +0100 |
---|---|---|
committer | Ken Barber <ken@bob.sh> | 2011-07-29 20:11:47 +0100 |
commit | 18e5302614bce168ac07e35dc23b058064e9e41c (patch) | |
tree | b45471bdb3846efa835ed394dd1e891620b86e54 /lib/puppet/parser | |
parent | 56a402e6542105ec63c5071e685d5af93fd4d0f3 (diff) | |
download | puppet-stdlib-18e5302614bce168ac07e35dc23b058064e9e41c.tar.gz puppet-stdlib-18e5302614bce168ac07e35dc23b058064e9e41c.tar.bz2 |
(#2) fix is_string finally so it also makes sure numbers return false.
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/is_string.rb | 4 |
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 |