Changing each to each_line to be compatible with ruby1.9