title: Ruby array to hash: each element the key and derive value from it
body: <p>I have an array of strings, and want to make a hash out of it. Each element of the array will be the key, and I want to make the value being computed from that key. Is there a Ruby way of doing this?</p>
  
  <p>For example:</p>
  
  <p><code>['a','b']</code> to convert to <code>{'a'=&gt;'A','b'=&gt;'B'}</code></p>