title: Ruby odd number of arguments for hash error
body: <pre><code>case look
    when 'side'
          hash1 = {
              'num' =&gt; 5,
              'style' =&gt; 'sideStyle',
          }
  
    when 'front'
          hash1 = {
              'num' =&gt; 8,
              'style' =&gt; 'frontStyle',
          }
  
    when 'back'
          hash1 = {
              'num' =&gt; 4,
              'style' =&gt; 'backStyle',
              'special' =&gt; 'yes',
          }
  
    else
          hash1 = {
              'num' =&gt; 2,
              'style' =&gt; 'noStyle',
          }
    end
  
    myStyle = Hash[hash1]
  </code></pre>
  
  <p>My piece of code looks like this.</p>
  
  <p>when I run this code I get "odd number of arguments for Hash".</p>
  
  <p>is this the correct way to from an hash? could someone please help me how to get it resolved.</p>