]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Note that also future parser does not work
authorAlexander Pánek <a.panek@brainsware.org>
Tue, 16 Sep 2014 17:03:02 +0000 (19:03 +0200)
committerAlexander Pánek <a.panek@brainsware.org>
Tue, 16 Sep 2014 17:03:02 +0000 (19:03 +0200)
lib/puppet/parser/functions/validate_string.rb

index 0bab21e09035e89ddd4596d336fc97d145f83057..c841f6abbc0c6f8eef2fe331c8b81069b87a2798 100644 (file)
@@ -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