Skip to content

Commit

Permalink
Concatenate arrays without modifying the first array
Browse files Browse the repository at this point in the history
  • Loading branch information
cmurphy authored and hunner committed Jul 31, 2014
1 parent c5f6c26 commit 85d5ead
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/puppet/parser/functions/concat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ module Puppet::Parser::Functions
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
Expand Down

0 comments on commit 85d5ead

Please sign in to comment.