summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/is_domain_name.rb
diff options
context:
space:
mode:
authorAshley Penney <ashley.penney@puppetlabs.com>2014-05-08 18:16:05 -0400
committerAshley Penney <ashley.penney@puppetlabs.com>2014-05-08 18:16:05 -0400
commit14d656dd415e75bc8768606944d579f182ede9ec (patch)
treed4faff54b5acadcc430675e992897f32b7409a72 /lib/puppet/parser/functions/is_domain_name.rb
parente2297a1ea6b711ca930a21adc56aefe7c602826f (diff)
parent0804121719e4bde856723e19e8ff8bf6f9c2d55d (diff)
Merge pull request #251 from hunner/fix_tests
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.rb3
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 == '.'