title: Ruby: passing array items into a case statement
body: <p>I am attempting to pass an array into a case statement so I can read the array elements as commands. Unfortunately, it seems that it is not working and the program jumps to the else statement.</p>
  
  <pre><code>def input_console()
              quit = 0
  
      puts "Tell me what you want to do:"
  
      loop do
  
          print "\n &gt;&gt;&gt; "
          input = gets.chomp
          sentence = input.split
  
          case sentence
              when sentence[0] == "go" &amp;&amp; sentence[1] == "to"
                  puts sentence[2]
              when sentence[0] == "quit"
                  quit = 1
              else
                  puts "No le entiendo Senor..."
          end
          break if quit == 1
      end
  end
  </code></pre>
  
  <p>This piece of code returns "No le entiendo Senor..." whatever you introduce. I expected to get the place I want to go after stating "go to Wherever".</p>
  
  <p>Please, ¿may you help me?</p>