From: Jorge Domenico Bucaran Romano Date: 2007-05-09T23:01:58+09:00 Subject: Re: Implementation of the object.sort method. Hi, I want a demonstrative implementation of the sort method to see how the callback (passed block) is handled, specifically the comparison result <=>. For example, in the following code: puts [4,5,3,2,1].sort do |a,b| -1 end puts [4,5,3,2,1].sort do |a,b| 1 end Both print the array sorted down up. I don't understand how this is possible so I wanted to see a demonstrative (but factual) implementation of the sort method to see how this parameters are handled. Regards, Jorge -- Posted via http://www.ruby-forum.com/.