title: Read file into hash with 2 values per key?
body: <p>Very similar question to: <a href="https://stackoverflow.com/questions/4119763/using-ruby-reading-a-file-containing-name-value-pairs-into-a-hash">Using Ruby, Reading a file, containing name/value pairs into a hash</a></p>
  
  <p>file:</p>
  
  <p><code>server1, jim, 22
  server2, bob, 44
  </code></p>
  
  <p>Tried this regular expression:</p>
  
  <p><code>Hash[*File.read('file.cfg').split(/[, \n]+/)]</code></p>
  
  <p>But I get:
  <code>odd number of arguments for Hash (ArgumentError)</code></p>
  
  <p>Me trying this out: <a href="http://rubular.com/r/BE6ZG2nTMw" rel="nofollow noreferrer">http://rubular.com/r/BE6ZG2nTMw</a></p>
  
  <p>What is the way to approach this? Is the issue the way the hash is initialized or my regexp?</p>