title: Testing for empty or nil-value string
body: <p>I'm trying to set a variable conditionally in Ruby.  I need to set it if the variable is nil or empty (0 length string).  I've come up with the following:</p>
  
  <pre><code>variable = id if variable.nil? || (!variable.nil? &amp;&amp; variable.empty?)
  </code></pre>
  
  <p>While it works, it doesn't seem very Ruby-like to me.  Is the a more succinct way of expressing the above?</p>