From: Todd Benson Date: 2007-11-08T16:55:23+09:00 Subject: Re: how to delete array On Nov 7, 2007 10:39 PM, ara.t.howard wrote: > > On Nov 7, 2007, at 9:11 PM, Todd Benson wrote: > > > Nevermind that. I can see how you might want to consider position in > > a condition (maybe state machine stuff or whatever). #delete_if is > > after all an Array method, which is the only set of objects that > > require a linear order. Sorry for noise now. > > no that's really a valid concern i think - happens to be that > #delete_if is defined in terms of #each (from Enumerable) so i know > it's in order but once indeed needs to assume/know that for it to work. > > cheers. > > > a @ http://codeforpeople.com/ Okay, I'll take note of that. I suggested that an Array was the only object required to hold a set of other objects in order. No, that methodology comes from the Enumerable mixin. Duh, I should be so stupid. In other words, we should be aware that "successive" order is something that holds for something that mixes in Enumerable no matter what the implementation. The fact that #delete_if doesn't exist in the Enumerable module is what threw me off. Also, I suppose we should pay attention to the fact that the action of "deleting if" applies to objects that are not necessarily in order (i.e. Hash). Hmm... I think this has been discussed before. thx ara, Todd