Skip to content

Commit 85d5ead

Browse files
cmurphyhunner
authored andcommitted
Concatenate arrays without modifying the first array
1 parent c5f6c26 commit 85d5ead

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/puppet/parser/functions/concat.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ module Puppet::Parser::Functions
2828
raise(Puppet::ParseError, 'concat(): Requires array to work with')
2929
end
3030

31-
if b.is_a?(Array)
32-
result = a.concat(b)
33-
else
34-
result = a << b
35-
end
31+
result = a + Array(b)
3632

3733
return result
3834
end

0 commit comments

Comments
 (0)