- ENDHEREDOC
- if (args.length < 2) or (args.length > 3) then
- raise Puppet::ParseError, ("validate_re(): wrong number of arguments (#{args.length}; must be 2 or 3)")
+ > *Note:*
+ Compilation will also abort, if the first argument is not a String. Always use
+ quotes to force stringification:
+ validate_re("${::operatingsystemmajrelease}", '^[57]$')
+ DOC
+ ) do |args|
+ function_deprecation([:validate_re, 'This method is deprecated, please use the stdlib validate_legacy function,
+ with Stdlib::Compat::Re. There is further documentation for validate_legacy function in the README.'])
+
+ if (args.length < 2) || (args.length > 3)
+ raise Puppet::ParseError, "validate_re(): wrong number of arguments (#{args.length}; must be 2 or 3)"