Function has now more robust error detection.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
This commit is contained in:
Krzysztof Wilczynski 2011-04-30 02:41:09 +01:00
parent b26d5b2f3b
commit 41798020d6

View file

@ -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