title: Geting a Typeerror with hashes (No implicit conversion of symbol into integer)
body: <p>I made a sample script. Here is the sample script I am running:</p>
  
  <pre><code>def array_generator
    signalp_array = Array.new(11){ Array.new(11,0) }
    signalp = Hash.new
    file = File.readlines("./sample.txt")
    file.each_with_index do |line, idx|
      row = line.gsub(/\s+/m, ' ').chomp.split(" ") # split the line into a array based on white space.
      signalp_array[idx][0..row.length - 1] = row # Merge into existing array
    end
    signalp_array.each do |g|
      seq_id = g[0] 
      cut_off = g[4]
      d_value = g[8]
      signalp[seq_id] = [:cut_off =&gt; cut_off, :d_value =&gt; d_value] 
    end
    return signalp
   end
  
  signalp = array_generator
  
  puts signalp 
  signalp.each do |id, neww|
    puts id
    puts neww[ :cut_off]
    puts neww[ :d_value]
  end
  </code></pre>
  
  <p>with which I am getting the following output and error:</p>
  
  <pre><code>isotig00001_f1_3
  in `[]': no implicit conversion of Symbol into Integer (TypeError)
  </code></pre>
  
  <p>Since the <code>puts signalp</code> line gives me the following:</p>
  
  <pre><code>{"isotig00001_f1_3"=&gt;[{:cut_off=&gt;"11", :d_value=&gt;"0.132"}], "isotig00001_f1_5"=&gt;[{:cut_off=&gt;"11", :d_value=&gt;"0.162"}], "isotig00001_f1_7"=&gt;[{:cut_off=&gt;"11", :d_value=&gt;"0.397"}], "isotig00001_f1_8"=&gt;[{:cut_off=&gt;"11", :d_value=&gt;"0.259"}], "isotig00001_f1_9"=&gt;[{:cut_off=&gt;"11", :d_value=&gt;"0.110"}], "isotig00001_f1_10"=&gt;[{:cut_off=&gt;"11", :d_value=&gt;"0.135"}], "isotig00001_f1_11"=&gt;[{:cut_off=&gt;"1", :d_value=&gt;"0.000"}], "isotig00001_f1_12"=&gt;[{:cut_off=&gt;"12", :d_value=&gt;"0.117"}], "isotig00001_f2_0"=&gt;[{:cut_off=&gt;"11", :d_value=&gt;"0.108"}], "isotig00001_f2_1"=&gt;[{:cut_off=&gt;"28", :d_value=&gt;"0.122"}], "isotig00001_f2_3"=&gt;[{:cut_off=&gt;"19", :d_value=&gt;"0.097"}]}
  </code></pre>
  
  <p>the hash is created properly. However I cannot access the <code>:cut_off</code> and <code>:d_value</code> individually (probably, because they are digits). I tried <code>to_i</code>, <code>to_s</code> methods etc.</p>
  
  <ol>
  <li>Could someone let me know what I am doing wrong?</li>
  <li>Any ideas on what to search for or where to learn more on the topic?</li>
  </ol>