diff options
author | Colleen Murphy <cmurphy@cat.pdx.edu> | 2013-11-19 20:24:46 -0800 |
---|---|---|
committer | Hunter Haugen <hunter@puppetlabs.com> | 2014-07-31 11:22:18 -0700 |
commit | 85d5eadbab273e838eb2de33e78054b8d3867f41 (patch) | |
tree | d8389e94059d4a54389f27420a644f99c3ee93f2 /lib/puppet | |
parent | c5f6c26d67a4f3777cec4af1a3850a6a5a2ccbc1 (diff) |
Concatenate arrays without modifying the first array
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/parser/functions/concat.rb | 6 |
1 files changed, 1 insertions, 5 deletions
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 |