summaryrefslogtreecommitdiff
path: root/join.rb
diff options
context:
space:
mode:
Diffstat (limited to 'join.rb')
-rw-r--r--join.rb6
1 files changed, 6 insertions, 0 deletions
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