From: Nobuyoshi Nakada Date: 2006-10-12T12:28:08+09:00 Subject: Re: Counting Frequency of Values in an Array (And Sorting by Frequency?) Hi, At Thu, 12 Oct 2006 11:52:19 +0900, x1 wrote in [ruby-talk:219218]: > Is there no method for an array that will tell me the # of occurrences > for an item? > > IE: ["a", "a", "a", "b", "c", "c"].count("a") #producing 3 ? FYI, Enumerable in 1.9 has that method. -- Nobu Nakada