Module: Polyfill::V2_4::Array::Instance::Concat::Method
- Defined in:
- lib/polyfill/v2_4/array/instance/concat.rb
Instance Method Summary collapse
Instance Method Details
#concat(*others) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/polyfill/v2_4/array/instance/concat.rb', line 7 def concat(*others) return super if others.length == 1 acc = [].concat(self) others.each do |other| acc.concat(other) end replace(acc) end |