------ art_7440_27810400.1189364898264 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/9/07, Ron Green <rongreen1 / mac.com> wrote: > > Marcel Molina Jr. wrote: > > It should be noted though that String#hash isn't garaunteed to be > > unique. > > Then,again I ask, what is it good for? It's still useful as a hash. Marcel wasn't wrong, but *no* fixed size hash is "guaranteed" to be unique as that's absolutely impossible, per the pigeonhole principle (http://en.wikipedia.org/wiki/Pigeonhole_principle). String#hash's hash is of a far lower "quality" than that offered by, say, SHA-1 or SHA-2. Regards, Peter Cooper http://www.rubyinside.com/ ------ art_7440_27810400.1189364898264--