title: Params assignment in dead branch leads to params being nil in Rails
body: <p>This is a before_action in a controller:</p>
  
  <pre><code>def map_params
    Rails.logger.error "[before] #{params.inspect}"
    if false
      params = { :hi =&gt; :there }
    end
    Rails.logger.error "[after] #{params.inspect}"
  end
  </code></pre>
  
  <p>This is an output:</p>
  
  <pre><code>[before] &lt;ActionController::Parameters ...&gt;
  [after] nil
  </code></pre>
  
  <p>Interestrngly enough, if I comment out the params assignment it will behave differently:</p>
  
  <pre><code>[before] &lt;ActionController::Parameters ...&gt;
  [after] &lt;ActionController::Parameters ...&gt;
  </code></pre>
  
  <p>Why is it happening?</p>