From: Brian Adkins Date: 2009-03-20T21:12:15+09:00 Subject: Re: nested methods James Coglan writes: > [Note: parts of this message were removed to make it a legal post.] > > 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, Isn't being defined in the same scope the antithesis of nesting? > and does not remember the environment it was created in. > Methods are not closures, unlike blocks/procs/lambdas. > > -- > James Coglan > http://github.com/jcoglan > -- Brian Adkins http://lojic.com/