title: Efficient switch case for nil in Ruby?
body: <p>I have three variables all of which can be nil:</p>
  
  <pre><code>to
  cc
  bcc
  </code></pre>
  
  <p>How can I assign <code>X</code> to any one of the to/cc/bcc given that any one of them can be nil (but not all three)? It seems ugly to do</p>
  
  <pre><code>if to.nil? and cc.nil?
     X = bcc
  elsif ...
  </code></pre>
  
  <p>You can't do </p>
  
  <pre><code> X = to or cc or bcc 
  </code></pre>
  
  <p>either.</p>