title: Returning the highest and lowest numbers in a string: Ruby
body: <p>Not sure what I'm doing incorrect but I seem to be getting it woefully wrong.</p>
  <p>The question is, you are given a string of space separated numbers, and have to return the highest and lowest number.</p>
  <p>Note:
  All numbers are valid Int32, no need to validate them.
  There will always be at least one number in the input string.
  Output string must be two numbers separated by a single space, and highest number is first.</p>
  <pre><code>def high_and_low(numbers)
    # numbers contains a string of space seperated numbers 
    #return the highest and lowest number 
   numbers.minmax { |a, b| a.length &lt;=&gt; b.length }  
     
  
  end
  </code></pre>
  <p>Output:</p>
  <pre><code>`high_and_low': undefined method `minmax' for &quot;4 5 29 54 4 0 -214 542 -64 1 -3 6 -6&quot;:String 
  </code></pre>