Concatenate arrays without modifying the first array

This commit is contained in:
Colleen Murphy 2013-11-19 20:24:46 -08:00 committed by Hunter Haugen
parent c5f6c26d67
commit 85d5eadbab

View file

@ -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