From: itsme213 Date: 2004-11-29T23:52:49+09:00 Subject: Re: Seeking advice on some method names "Gavin Sinclair" wrote in message > #any? and #all? are methods of Enumerable, not Array. Ah yes. So now I think #one, #one?, #none, #none?, #any, #any?, #all, #all? can all be on Enumerable, perhaps with overrides for Array. > I like the idea > of Enumerable#one? and Enumerable#none? to complement them. I agree. > But I don't think Enumerable#one? and Array#one are complementary; > they seem entirely different. Array#one {|x| pred} would complement Enumerable#one? {|x| pred} so Array#one is same as Array#one{|x|true} which complements Enumerable#one?{|x|true} > Likewise with Array#any: it's useful, but really has nothing to do > with #any? Array#any{|x| pred} complements Enumerable#any? {|x| pred} so Array#any complements Enumerable#any?{|x|true}