From: Ryan Pavlik Date: 2003-04-25T15:03:29+09:00 Subject: Re: Hashes and Enumerable#each_with_index On Fri, 25 Apr 2003 08:10:04 +0900 matz@ruby-lang.org (Yukihiro Matsumoto) wrote: > Hi, > > In message "Hashes and Enumerable#each_with_index" > on 03/04/25, Ryan Pavlik writes: > |Would it not be more useful to adopt the definiton of > |Enumerable#each_with_index where the index given is such that e[i] == o > |for any given Enumerable? > > No. Index in each_with_index means offset of the values. It might be > possible to implement a method that you described for arrays, hashes, > string, etc. But it should have different name. I actually don't really care here... new name (the each_with_key suggestion sounds OK to me) or old name, as long as it's there, it'd be a little more useful, IMHO. -- Ryan Pavlik "Now is not the time for sarcasm! Now is the time for nefarious action." - 8BT