From: Robert Dober Date: 2008-07-02T04:57:33+09:00 Subject: Re: Hash#select returns an array but Hash#reject returns a hash... On Tue, Jul 1, 2008 at 4:24 PM, David A. Black wrote: > Hi -- > > On Tue, 1 Jul 2008, Srijayanth Sridhar wrote: > >> On Tue, Jul 1, 2008 at 7:26 PM, Robert Dober >> wrote: >>> >>> On Tue, Jul 1, 2008 at 3:42 PM, Rick DeNatale >>> wrote: >>> I rather agree with Rick although David has a point too. >>> >> >> Yeah I agree with Rick as well or I wouldn't have asked the question >> in the first place. > > Rick made some points about in-place changes vs. copies of Ruby > objects that I agree with, but that wasn't what my post was about :-) > See my last one too. > Actually I think the most important thing about this is, yes I know you guessed and you disagree, consistency;) But give me a chance, it can be consistent that whatever.reject.class == whatever.class and whatever.select.class == Array. That was exactly why I named my Hash returning methods hselect, vselect and kselect. However personally I would prefer a different kind of consistency on this one, as some others would, I do not even daresay that we are a majority ;). Cheers Robert