title: Coercing a scalar or an array to become an array
body: <p>Sometimes I want a variable to always be an array, whether its a scalar or already an array.</p>
  
  <p>So I normally do:</p>
  
  <pre><code>[variable].flatten
  </code></pre>
  
  <p>which is compatible with ruby-1.8.5, 1.8.7, 1.9.x. </p>
  
  <p>With this method when <code>variable</code> is a string (<code>variable = "asdf"</code>), it gives me <code>["asdf"]</code>. If it's already an array (<code>variable = ["asdf","bvcx"]</code>), it gives me: <code>["asdf","bvcx"]</code>.</p>
  
  <p>Does anyone have a better way? "Better" meaning more readable, more performant, succinct or more effective in other ways.</p>