From: Tobias Reif Date: 2001-10-28T06:52:15+09:00 Subject: [ruby-talk:23647] Re: sleeping, calling methods inside class defs David Alan Black wrote: > Note that there's a consistent underlying principle to all of this: Thank you very much for your explanations. The help from this list is invaluable while learning Ruby. I know now why this ----- class Tobi def hey "hey!\n" end print hey end ----- doesn't work. Now I'd like to know why this *does* work: ----- def hey "hey!\n" end print hey ----- Do I define a method for instances of class Object, and when methods are called, I get an instance of Object for free? Tobi -- Tobias Reif http://www.pinkjuice.com/myDigitalProfile.xhtml go_to('www.ruby-lang.org').get(ruby).play.create.have_fun http://www.pinkjuice.com/ruby/