From: Alex Young Date: 2007-06-22T15:19:12+09:00 Subject: Re: Behaviour of Enumerables reject vs. select mixed into Hash Todd Benson wrote: > On 6/21/07, Trans wrote: >> >> >> > On 6/21/07, Rob Biedenharn wrote: >> > >> > > What no one seems to have (directly) focussed on is that Hash#each >> > > gives two-element [k,v] arrays back as the content. >> >> That's right. And if you wanted things to be "just ducky", it would >> have to give only the v. I've actually argued in favor of that before, >> b/c it's not unreasonable to see that an Array index is like a Hash >> key. > > Regardless of what we think is the best, it's seems pretty clear to me > that the duplicate of the Hash is broken during a delete_if, reject, > select, etc. That's one reason I'd like to see more #to_hash methods lying around. -- Alex