title: Load a single-column CSV file into a Ruby array
body: <p>I am new to Ruby.<br>
  Below is my naive code to load a single-column CSV file into a Ruby array.</p>
  
  <p>QUESTION: Is there something better?<br>
  In particular, how to not hard-code the number of items?</p>
  
  <pre><code>require 'csv'
  COUNTRIES = Array.new(240)
  i = 0
  CSV.foreach "#{RAILS_ROOT}/config/countries.csv" do |country|
    COUNTRIES[i] = country[0]
    i = i + 1
  end
  </code></pre>