title: Reading and writing Sinatra params using symbols, e.g. params[:id]
body: <p>My form receives data via POST. When I do <code>puts params</code> I can see:</p>
  
  <pre><code>{"id" =&gt; "123", "id2" =&gt; "456"}
  </code></pre>
  
  <p>now the commands:</p>
  
  <pre><code>puts params['id']    # =&gt;  123
  puts params[:id]     # =&gt;  123
  
  params['id'] = '999'
  puts params          # =&gt; {"id" =&gt; "999", "id2" =&gt; "456"}
  </code></pre>
  
  <p>but when I do:</p>
  
  <pre><code>params[:id] = '888'
  puts params
  </code></pre>
  
  <p>I get    </p>
  
  <pre><code>{"id" =&gt; "999", "id2" =&gt; "456", :id =&gt; "888"}
  </code></pre>
  
  <p>In IRB it works fine:</p>
  
  <pre><code>params
  # =&gt; {"id2"=&gt;"2", "id"=&gt;"1"}
  
  params[:id]
  # =&gt; nil
  
  params['id']
  # =&gt; "1"
  </code></pre>
  
  <p><strong>Why can I read the value using <code>:id</code>, but not set the value using that?</strong></p>