From: "David A. Black" Date: 2004-09-21T01:23:07+09:00 Subject: Re: Array#index block and rdetect Hi -- On Tue, 21 Sep 2004, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Array#index block and rdetect" > on Mon, 20 Sep 2004 22:21:08 +0900, "David A. Black" writes: > > |Or, if index always means a (to_a-based) numerical index, then > |#each_index should be in Enumerable, and not left to the individual > |classes. Then it would be clearer that index == 0-origin, possibly > |meaningless (for unordered collections), numerical index. Classes > |that specialized from this could either re-use the name index (for > |example, a 1-origin collection), or introduce a set of methods with a > |new name/concept (like key). > > This (numerical index) is what I thought when I designed > each_with_index. So I vote for introducing a new name. I liked Tom's idea of "counter". That seems to be more what it is. David -- David A. Black dblack@wobblini.net