From: Robert Dober Date: 2007-06-22T17:47:30+09:00 Subject: Re: Behaviour of Enumerables reject vs. select mixed into Hash On 6/22/07, Alexander Presber wrote: > > As I see it, there should _be_ no Hash#reject (nor Array#reject). Alexander thank you so much :) In the future maybe. Right now Hash#reject is just the poor man's implementation of the concepts which are discussed in this post. Right now I feel it would be nice if its sibbling Hash#select returned a Hash too. > > Hash (and in fact any class mixing in Enumerable) should be able to > use Enumerable#reject to filter out elements. > That is what Trans's/Daniels code aims at (hope I am not > misinterpreting them here). Not at all IMHO > > Other than providing exactly this generality for iteration > (==enumeration) methods I see no need to have introduced the class > Enumerable at all. Sure that is it's purpose but be careful it is a module. I do not see any harm in overriding some of the mixed in methods for special cases like Hash, it is reasonable approach. > > Sincerely yours > Alex > > Robert -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw