title: Is there a way to conditionally add to an array in one line?
body: <p>I have str1 and str2.  str1 may or not be an empty string, and I want to construct an array like:</p>
  
  <pre><code>str1 = ""
  str2 = "bar"
  ["bar"]
  </code></pre>
  
  <p>or </p>
  
  <pre><code>str1 = "foo"
  str2 = "bar"
  ["foo", "bar"]
  </code></pre>
  
  <p>I can only figure out a way to do this on two lines right now but I know there must be a way to do it one.  </p>