summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2014-09-17 09:44:51 -0700
committerHunter Haugen <hunter@puppetlabs.com>2014-09-17 09:44:51 -0700
commitb347cc83e24e7ef51dc340bc753b96af026050f8 (patch)
tree2b6b7ecf4138e71e897b9dd5b1cd6034a73cbf4f /lib/puppet/parser/functions
parent9e8127bb64421f8476c32ba971a375c9c82fd7f0 (diff)
parent6631934df8775305bc6c92514b5dec3624f5ba4d (diff)
downloadpuppet-stdlib-b347cc83e24e7ef51dc340bc753b96af026050f8.tar.gz
puppet-stdlib-b347cc83e24e7ef51dc340bc753b96af026050f8.tar.bz2
Merge pull request #320 from JimPanic/patch-2
Update docs of validate_string to reflect bug
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r--lib/puppet/parser/functions/validate_string.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/puppet/parser/functions/validate_string.rb b/lib/puppet/parser/functions/validate_string.rb
index e667794..c841f6a 100644
--- a/lib/puppet/parser/functions/validate_string.rb
+++ b/lib/puppet/parser/functions/validate_string.rb
@@ -13,9 +13,14 @@ module Puppet::Parser::Functions
validate_string(true)
validate_string([ 'some', 'array' ])
- $undefined = undef
- validate_string($undefined)
-
+
+ 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('...')
+ }
+
ENDHEREDOC
unless args.length > 0 then