title: Return empty array (Ruby)
body: <p>I am trying to create a condition statement in Ruby. If my array of various numbers is empty or nil, it should return an empty array otherwise it should sort the numbers. This is what I have so far.</p>
  
  <pre><code>num == nil || num.empty? ? return num : num.sort!
  </code></pre>
  
  <p>...where num is my array. However I'm getting the following error:</p>
  
  <pre><code>syntax error, unexpected tIDENTIFIER, expecting ':'
  </code></pre>
  
  <p>I get this error if num is an array of numbers or nil. I'm not sure why this isn't working. Any thoughts? </p>