From: "trans. (T. Onoma)" Date: 2004-09-21T20:33:52+09:00 Subject: Re: Array#index block and rdetect On Tuesday 21 September 2004 07:09 am, David A. Black wrote: > I prefer "key" for hashes and "index" for arrays (I know Robert > disagrees), so I would tend to avoid "index" names for hash methods. > But I have no deep theoretical argument here.  I'm just following what > I think is common usage (index/element for array, key/value for hash). For sake of interchangeability (after all that's the upside of ducktyping) have an alias for both: Array def each_with_index alias each_with_key each_with_index Hash def each_with_key alias each_with_index each_with_key Good? T.