From: Robert Dober Date: 2010-04-10T03:03:47+09:00 Subject: Re: Is it possible, a fully general Enumerable#recursive ? On Thu, Apr 8, 2010 at 5:51 AM, David Masover wrote: > On Wednesday 07 April 2010 04:49:15 pm Intransition wrote: > >> This works for #each and #map but not #sort. > > #sort isn't a method of Enumerable, it's a method of Array. ruby-1.9.1-p378 > Enumerable.instance_methods.grep /sort/ => [:sort, :sort_by] However you will need to define #<=> on the return value of recursive. HTH R. -- Learning without thought is labor lost; thought without learning is perilous.” --- Confucius