From: Yossef Mendelssohn Date: 2009-03-06T00:41:55+09:00 Subject: Re: Any solutions to Ruby's inconsistencies? On Mar 4, 3:32 pm, "C. Dagnon" wrote: > >     key = map.keys.detect { |k|  k.to_s.downcase == > > matcher.to_s.downcase } > > Hmmm, what is 'detect'? 'detect' is a synonym for 'find' (or maybe it's the other way around). I prefer to use the *ect methods when working with Enumerables instead of the simpler/shorter synonyms. This is in part because they get some consistency and connection, but also because Rails overrides some of them on Enumerable-like association proxies. And some of them don't even have non-ect synonyms. [].detect -> [].find [].select -> [].find_all [].reject -> [].collect -> [].map [].inject -> -- -yossef