diff options
author | Hunter Haugen <hunter@puppetlabs.com> | 2014-09-17 09:44:51 -0700 |
---|---|---|
committer | Hunter Haugen <hunter@puppetlabs.com> | 2014-09-17 09:44:51 -0700 |
commit | b347cc83e24e7ef51dc340bc753b96af026050f8 (patch) | |
tree | 2b6b7ecf4138e71e897b9dd5b1cd6034a73cbf4f /lib | |
parent | 9e8127bb64421f8476c32ba971a375c9c82fd7f0 (diff) | |
parent | 6631934df8775305bc6c92514b5dec3624f5ba4d (diff) | |
download | puppet-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')
-rw-r--r-- | lib/puppet/parser/functions/validate_string.rb | 11 |
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 |