From 2092f29f9424ac014add0713666ef90f9f1a921c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A4r=20Lindfors?= <paran@nsc.liu.se> Date: Fri, 17 Mar 2017 13:09:17 +0100 Subject: [PATCH] Use string representations in cartesian(). This makes the cartesian() function handle some of the data types added in recent versions of Puppet without crashing. Example, when using Puppet 4: cartesian('foo', [1, 2]) returns ['foo1', 'foo2'] Signed-off-by: Thomas Bellman <bellman@nsc.liu.se> This was originally commit a11ce806b001 in nsc-puppet-utils. --- lib/puppet/parser/functions/cartesian.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/parser/functions/cartesian.rb b/lib/puppet/parser/functions/cartesian.rb index 4f16d38..c69dce8 100644 --- a/lib/puppet/parser/functions/cartesian.rb +++ b/lib/puppet/parser/functions/cartesian.rb @@ -36,7 +36,7 @@ module Puppet::Parser::Functions newres = [] result.each do |p1| a.each do |p2| - newres << p1+p2 + newres << p1+p2.to_s end end result = newres -- GitLab