From: Dave Thomas Date: 2001-10-10T03:08:57+09:00 Subject: [ruby-talk:22326] Re: blocks with min and max Mark Slagell writes: > ... but this is characteristic of sorting logic, which does not > presuppose an order. min and max have sufficient inherent meaning that > it seems it should make sense to say > > largest = collection.max {|obj| obj.attrib} Or even the more general case Comparable#compare_using { .... } such as collection.compare_using {|a,b| a.name <=> b.name} largest = collection.max puts collection.sort etc Dave