Function has now more robust error detection.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This commit is contained in:
parent
b26d5b2f3b
commit
41798020d6
1 changed files with 6 additions and 0 deletions
6
join.rb
6
join.rb
|
@ -19,6 +19,12 @@ module Puppet::Parser::Functions
|
|||
|
||||
suffix = arguments[1] if arguments[1]
|
||||
|
||||
if suffix
|
||||
unless suffix.is_a?(String)
|
||||
raise(Puppet::ParseError, 'join(): Requires string to work with')
|
||||
end
|
||||
end
|
||||
|
||||
result = suffix ? array.join(suffix) : array.join
|
||||
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue