From: unbewusst.sein@... (=?ISO-8859-1?Q?Une_B=E9v?= =?ISO-8859-1?Q?ue?=) Date: 2007-09-20T04:30:19+09:00 Subject: Re: special Array method about Unix pathes Robert Klemme wrote: > > You can even leave the "self." out. :-) OK ! > I can think of several approaches to solve this: > > 1. order the array and do a second iteration where each item is > checked against the last seen prefix; the idea is that every string > comes before the strings that contain it as prefix. fine, the Array is allready ordered elsewhere, i thought putting sort! in this method )) > 2. insert names into a tree and output only prefixes during a tree walk. ok, i see what you mean, may be better not to do that when output rather than when building the three having a means to compare three deepness. > B�vue, the only issue I see with your method naming is that in Ruby > methods typically use under_scores and not CamelCase as in Java. Yes i've corrected that, it's an habit coming from java, as the getter "getContainers!"... -- Une B�vue