diff options
author | Hunter Haugen <hunter@puppetlabs.com> | 2014-05-08 14:43:06 -0700 |
---|---|---|
committer | Hunter Haugen <hunter@puppetlabs.com> | 2014-05-08 14:55:23 -0700 |
commit | 0804121719e4bde856723e19e8ff8bf6f9c2d55d (patch) | |
tree | d4faff54b5acadcc430675e992897f32b7409a72 /lib/puppet/parser/functions/is_domain_name.rb | |
parent | e2297a1ea6b711ca930a21adc56aefe7c602826f (diff) | |
download | puppet-stdlib-0804121719e4bde856723e19e8ff8bf6f9c2d55d.tar.gz puppet-stdlib-0804121719e4bde856723e19e8ff8bf6f9c2d55d.tar.bz2 |
Fix the stdlib functions that fail tests
Diffstat (limited to 'lib/puppet/parser/functions/is_domain_name.rb')
-rw-r--r-- | lib/puppet/parser/functions/is_domain_name.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/is_domain_name.rb b/lib/puppet/parser/functions/is_domain_name.rb index 5826dc0..b3fee96 100644 --- a/lib/puppet/parser/functions/is_domain_name.rb +++ b/lib/puppet/parser/functions/is_domain_name.rb @@ -20,6 +20,9 @@ Returns true if the string passed to this function is a syntactically correct do label_min_length=1 label_max_length=63 + # Only allow string types + return false unless domain.is_a?(String) + # Allow ".", it is the top level domain return true if domain == '.' |