From: Spitfire Date: 2006-12-26T04:45:05+09:00 Subject: Re: dynamic changes! Robert Klemme wrote: > On 25.12.2006 19:37, Spitfire wrote: >> These are the sequence of actions I performed in irb. >> >> class Dumber >> def sayHello >> puts "Hello!" >> end >> end >> db = Dumber.new() >> >> db.sayHello >> ## executes sayHello method! >> >> Class Dumber >> def sayHi >> puts "Hi" >> end >> end >> >> db.sayHi >> ## executes the newly added method sayHi! >> >> how does the object already created aware of the newly added method? > > The method is added to it's *class* - and that relationship does not > change, only the class changes. It's class? I'm sorry I don't understand what you are saying. Can you please clarify? -- _ _ _]{5pitph!r3}[_ _ _ __________________________________________________ �I'm smart enough to know that I'm dumb.� - Richard P Feynman