From 41798020d6620a58b0f5a9aa8fa467512aa3fecc Mon Sep 17 00:00:00 2001 From: Krzysztof Wilczynski Date: Sat, 30 Apr 2011 02:41:09 +0100 Subject: Function has now more robust error detection. Signed-off-by: Krzysztof Wilczynski --- join.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/join.rb b/join.rb index 4d20731..945556a 100644 --- a/join.rb +++ b/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 -- cgit v1.2.3