From: "trans. (T. Onoma)" Date: 2004-09-21T00:43:59+09:00 Subject: Re: Array#index block and rdetect On Monday 20 September 2004 10:59 am, Robert Klemme wrote: > No. You *can* enumerate all elements (or all pairs) in a Hash. Well, there is a a subtle distinction that can be drawn: by "enumerating a hash", it undergoes a transformation and it isn't really a hash any more --order has imposed upon it, and hashes have no order. Hence David's sense of a "magic" to_a. Granted this is quite minor. So, I agree with you. I just think the word 'index' is the wrong word, and source of much the "confusion". If it's really needed the word 'enumerator' would be better. each_with_enumerator{|a,e| ... } (Or perhaps just 'enum' for short) And then each_with_index can be defined as has been suggested, per class. For Array it would just be an alias to the above I suppose. T. -- ( o _ カラチ // trans. / \ transami@runbox.com I don't give a damn for a man that can only spell a word one way. -Mark Twain