Skip to content

Commit

Permalink
Merge pull request #320 from JimPanic/patch-2
Browse files Browse the repository at this point in the history
Update docs of validate_string to reflect bug
  • Loading branch information
hunner committed Sep 17, 2014
2 parents 9e8127b + 6631934 commit b347cc8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/puppet/parser/functions/validate_string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b347cc8

Please sign in to comment.