From: Sean O'Dell Date: 2004-06-22T00:24:21+09:00 Subject: Re: About top-level method On Sunday 20 June 2004 22:33, Sam Sungshik Kong wrote: > Hello! > > I'm reading a book named "Teach yourself Ruby". > In chapter 2, it says that top-level methods are Object's private instance > methods. > But my test shows different results. > > In irb, I tested it like the following. > > def my_f > p "my_f" > end > > Object.my_f #=> print "my_f" > obj = Object.new > obj.my_f #=> print "my_f" > > Then, my_f is an instance method, and a class method as well? > > Can anyone help me understand it? The Object class is the base of every other class, and is itself an instance of class Class. Sean O'Dell