New to ruby --- getting the wrong count assigned to a variable : I am trying to store the highest count to a variable. I seem to show the right counts when I loop through my array but the assignment to the high count variable  always seems to be the count of the last item checked in the array. 
    def calculate_word_frequency(content, line_number)
    looper = 0
    wordCounter = ""
    #CREATE AN ARRAY FROM EACH LINE
    myArray = content.split
    #LOOP THROUGH ARRAY COUNTING INSTANCES OF WORDS
    while looper < myArray.length 
      p myArray[looper]
      wordCounter = myArray[looper]
      puts myArray.count(wordCounter)
      if highest_wf_count  < myArray.count
        highest_wf_count = myArray.count
      end
      looper +=1
    end
    puts highest_wf_count
  end

Any help would be appreciated