title: Case statement and comparison with integers
body: <p>I'm a newbie with Ruby and I don't know why it behaves this way in this case statement:</p>
  
  <pre><code>def evaluate(number)
    case
    when number&lt;0
      puts "#{number} is negative"
    when 0..50
      puts "#{number} is between 0 and 51"
    when 51..100
      puts "#{number} is between 51 and 100"
    else 
      puts "#{number} is greater than 100"
  
    number = gets.chomp.to_i
  
    puts evaluate(number)
  </code></pre>
  
  <p>when passing -4 for example it works but if I add number to the case</p>
  
  <pre><code>  def evaluate(number)
    case number
    when number&lt;0 ...
  </code></pre>
  
  <p>then it interprets the negative value as if was an else and prints out <em>is greater than 100</em> </p>
  
  <p>Is there a reason for that? I'de be very thankful if someone could help me out</p>