Skip to content

Commit b347cc8

Browse files
committed
Merge pull request #320 from JimPanic/patch-2
Update docs of validate_string to reflect bug
2 parents 9e8127b + 6631934 commit b347cc8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/puppet/parser/functions/validate_string.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ module Puppet::Parser::Functions
1313
1414
validate_string(true)
1515
validate_string([ 'some', 'array' ])
16-
$undefined = undef
17-
validate_string($undefined)
18-
16+
17+
Note: validate_string(undef) will not fail in this version of the
18+
functions API (incl. current and future parser). Instead, use:
19+
20+
if $var == undef {
21+
fail('...')
22+
}
23+
1924
ENDHEREDOC
2025

2126
unless args.length > 0 then

0 commit comments

Comments
 (0)