title: Sorting a hash by the results of a method, ordering nil results to the bottom
body: <pre><code>def valueize(val)
    # randomly returns nil or random integer ([-100 to +100] + val)
    ((rand(100) % 3) == 0) ? nil : (rand(200)-100+val)
  end
  
  hash = {
    x: 11,
    y: 22,
    z: 33
   }
  
  sort_by_abs = hash.sort_by{ |k, v|  (valueize(v)).abs }
  sort_by_min = hash.sort_by{ |k, v|  (valueize(v))     }
  sort_by_max = hash.sort_by{ |k, v| -(valueize(v))     }
  </code></pre>
  
  <p>What is the most rubyish way of ensuring nil results are always sorted to the bottom, for each of the three sorts?</p>
  
  <p>Conditions:</p>
  
  <ul>
  <li>Range of potential hash values is <strong>unknown</strong> (hash values will always be integers)</li>
  <li>valueize method <strong>cannot</strong> be modified </li>
  <li>sort blocks <strong>can</strong> be modified</li>
  </ul>