From: Andrea Fazzi Date: 2006-12-19T02:27:29+09:00 Subject: Re: item order in Object#methods Gavin Kistner wrote: > From: Andrea Fazzi [mailto:andrea.fazzi@alca.le.it] > >> Rob Biedenharn wrote: >> >>> If it's important, why not sort them first: >>> self.methods.sort.collect { ... } >>> >> Because I'm interested to the methods' definition order >> inside the class >> not to the alphabetical order of methods' name. The names init_1, >> init_2, etc. were just an example. >> > > I'm moderately sure that Ruby doesn't internally keep track of the order > in which classes were defined, or the order in which methods are added > to them. But that doesn't mean you can't do it yourself with a little > bit of work. > > Thank you Gavin, your implementation solved my problem! I like very very much your solution! :-) Thanks again. Andrea