title: can't convert Hash into Integer (TypeError)
body: <p>CSV file
  I have 1000 files in one directory. I want to call all the CSV files in that directory and execute <code>if</code> condition. If condition satisfies it should print <code>name</code> else it should print <code>"nothing"</code></p>
  
  <p>Example of csv:</p>
  
  <pre><code>name,id,address,country,food
  A,11,bcvhcbdc,india,biryani
  </code></pre>
  
  <p>...</p>
  
  <pre><code>require "csv"
  
  path="/logs/*exception_evaluation_summary.csv"
  
  #calling csv files in the directory
  Dir.glob(path).each do |f|
    #reading csv files
    csv = CSV.read(f, :headers=&gt;true, :encoding =&gt; "bom|utf-8")
  
    csv.each do |record|
      if (record['id'] != 0 &amp;&amp; record['country']=="india" &amp;&amp; record['food']=="biryani") 
        print record[name]
      else
        print "nothing"
      end
    end
  end
  </code></pre>