From 85d5eadbab273e838eb2de33e78054b8d3867f41 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Tue, 19 Nov 2013 20:24:46 -0800 Subject: Concatenate arrays without modifying the first array --- lib/puppet/parser/functions/concat.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/functions/concat.rb b/lib/puppet/parser/functions/concat.rb index 6c86382..0d35b07 100644 --- a/lib/puppet/parser/functions/concat.rb +++ b/lib/puppet/parser/functions/concat.rb @@ -28,11 +28,7 @@ Would result in: raise(Puppet::ParseError, 'concat(): Requires array to work with') end - if b.is_a?(Array) - result = a.concat(b) - else - result = a << b - end + result = a + Array(b) return result end -- cgit v1.2.3