title: `var = something rescue nil` behaviour
body: <p>In Ruby you can write a <code>rescue</code> at the end of an assignment to catch any errors that might come up. I have a function (below: <code>a_function_that_may_fail</code>) where it's convenient to let it throw an error if certain conditions aren't met. The following code works well</p>
  
  <pre><code>post = {}
  # Other Hash stuff
  post['Caption'] = a_function_that_may_fail rescue nil
  </code></pre>
  
  <p>However I'd like to have post['Caption'] not even set if the function fails.</p>
  
  <p>I know I can do:</p>
  
  <pre><code>begin
    post['Caption'] = a_function_that_may_fail
  rescue
  end
  </code></pre>
  
  <p>but that feels a little excessive - is there a simpler solution?</p>