summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
authorAlexander Pánek <a.panek@brainsware.org>2014-09-16 19:03:02 +0200
committerAlexander Pánek <a.panek@brainsware.org>2014-09-16 19:03:02 +0200
commit6631934df8775305bc6c92514b5dec3624f5ba4d (patch)
tree2b6b7ecf4138e71e897b9dd5b1cd6034a73cbf4f /lib/puppet
parent448e66b8bb3bd5a2b413436b21c2c480511223c8 (diff)
downloadpuppet-stdlib-6631934df8775305bc6c92514b5dec3624f5ba4d.tar.gz
puppet-stdlib-6631934df8775305bc6c92514b5dec3624f5ba4d.tar.bz2
Note that also future parser does not work
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/functions/validate_string.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/puppet/parser/functions/validate_string.rb b/lib/puppet/parser/functions/validate_string.rb
index 0bab21e..c841f6a 100644
--- a/lib/puppet/parser/functions/validate_string.rb
+++ b/lib/puppet/parser/functions/validate_string.rb
@@ -14,11 +14,13 @@ module Puppet::Parser::Functions
validate_string(true)
validate_string([ 'some', 'array' ])
- NOTE: undef will only fail when using the future parser (See: https://tickets.puppetlabs.com/browse/MODULES-457)
+ Note: validate_string(undef) will not fail in this version of the
+ functions API (incl. current and future parser). Instead, use:
+
+ if $var == undef {
+ fail('...')
+ }
- $undefined = undef
- validate_string($undefined)
-
ENDHEREDOC
unless args.length > 0 then