title: Ruby: How to concatenate array of arrays into one
body: <p>I have an array of arrays in Ruby on Rails (3.1) where all the internal arrays are of different size. Is there a way to easily concatenate all the internal arrays to get one big one dimesional array with all the items?</p>
  
  <p>I know you can use the Array::concat function to concatenate two arrays, and I could do a loop to concatenate them sequentially like so:</p>
  
  <pre><code>concatenated = Array.new
  array_of_arrays.each do |array|
      concatenated.concat(array)
  end
  </code></pre>
  
  <p>but I wanted to know if there was like a Ruby one-liner which would do it in a cleaner manner.</p>
  
  <p>Thanks for your help.</p>