From: Sebastian Hungerecker Date: 2009-07-12T00:26:40+09:00 Subject: Re: help for code understanding Am Samstag 11 Juli 2009 17:16:10 schrieb Li Chen: > def seq > self.class.new(self) > end > > > What does the code do, especially for class.new()? It calls the new method on the class of self, which will, presumably, create an instance of self's class. In other words: It will create a new object of the same class as the object you invoke the seq method on. HTH, Sebastian