2009/6/18 Andrew Timberlake <andrew / andrewtimberlake.com>: > On Thu, Jun 18, 2009 at 1:47 PM, Mike Stephens <rubfor / recitel.net> wrote: >> >> When you enter a script, am I right in thinking that automatically an >> overall Module object and a Class object are created, so that all your >> methods not within another class or module are part of these objects? >> What are the names of these two default objects? > > You can see for yourself by using ruby > > puts self.inspect > puts self.class.inspect > puts self.class.included_modules.inspect Note that there are differences between versions of Ruby: 16:13:18 JavaProducts_NGCP_dev_R1.0_PoA$ allruby -e 'p self, self.class, class<<self;ancestors;end' CYGWIN_NT-5.1 padrklemme1 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin ======================================== ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin] main Object [Object, Kernel] ======================================== ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-cygwin] main Object [Object, Kernel, BasicObject] 16:13:24 JavaProducts_NGCP_dev_R1.0_PoA$ Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/