On Wed, 10 Oct 2001, Niklas Frykholm wrote: > On Wed, Oct 10, 2001 at 04:45:45AM +0900, Mathieu Bouchard wrote: > > Then how would this translate to the latter way? > > largest = collection.max {|obj1, obj2| > > r = obj1.foo <=> obj2.foo > > r = nil if r == 0 > > r || (obj1.bar <=> obj2.bar) > > } > largest = collection.max {|obj| [obj.foo, obj.bar]} > Looks better too. Good. By the way, when will Array include Comparable ? ________________________________________________________________ Mathieu Bouchard http://hostname.2y.net/~matju