From: "Jesús Gabriel y Galán" Date: 2010-12-09T02:56:27+09:00 Subject: Re: Vortex Level0 with Ruby On Tue, Dec 7, 2010 at 11:22 PM, Eugeni Akmuradov wrote: > i just need some time :) > here you basically ovverides the base class for the TCPSocket, and than > creating an instance of that class, which have an modified function open > to close the socket, right ? In Ruby, classes are open. This means that at any time, you can reopen the class to do stuff to the class, such as adding methods. Any instance of that class will have that method available, even the ones created before the change. In this case, Ryan is adding a class method that internally creates an instance of the TCPSocket class, and yields it to a block, ensuring that after calling the block, the socket is closed. Jesus.