From: Ryan Davis Date: 2007-11-11T16:51:11+09:00 Subject: Re: bug in nested defs (?) On Nov 10, 2007, at 23:40 , Greg Weeks wrote: > When the following code is evaluated > > def foo ; "foo" ; end > > where does the method go? Here is what I would guess. > > If the evaluation context of the def is a class, then the method is > an > instance method of the class. If the evaluation context of the def > is > not a class, then the method is a singleton method of the context > object. not quite. see "Defining a Method" of the pickaxe ed 2 on page 330.