From: James Coglan Date: 2009-03-20T20:27:13+09:00 Subject: Re: nested methods --001636c92545954bbb04658b3c5e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 2009/3/20 Leo > > Can someone explain why the nested method hides the outer method? > > There are no nested methods in ruby (similar to smalltalk, eiffel, > java and unlike scheme, python etc.). This statement could confuse people given the above. Clearly you can define methods inside other methods, the point is that the 'inner' method is not local to the outer one. The inner one becomes defined in the same scope as the outer one, and does not remember the environment it was created in. Methods are not closures, unlike blocks/procs/lambdas. -- James Coglan http://github.com/jcoglan --001636c92545954bbb04658b3c5e--