A simple progam to analyze a text file implemented in Ruby