From: ts Date: 2001-10-30T19:54:28+09:00 Subject: [ruby-talk:23829] Re: sleeping, calling methods inside class defs >>>>> "J" == Joel VanderWerf writes: J> I'm not so concerned about the public/private difference as about the J> asymmetry in which class receives the definition. What is is about J> "main" or "Object" that causes def to attach methods to the "type", in J> that context, rather than to "self"? Is this just a special case in the J> interpreter? When you define a def it's defined in the current class. At toplevel the current class is Object, this mean that you define a method of Object. When you write class A end ruby change the current class to A. a def inside A is defined in A Guy Decoux