From: Frederick Cheung Date: 2008-08-20T01:41:57+09:00 Subject: Re: Array API On 19 Aug 2008, at 11:15, Tushar Gandhi wrote: >> >>> How it is possible that we are able to use enumerable sort_by method >>> for >>> an array of object? >>> >> Because that's what including a module does: it adds the methods >> defined in the module to the class. >> >> Fred > > Hi, > Is sort_by method will cause performance problem? or Is it faster > sort? It's what is often known as a schwartzian transform. Joss Susser wrote some stuff up on sort/sort_by just a few days ago: http://blog.hasmanythrough.com/2008/8/17/sorting-things-out Fred