From: Chochain Lee Date: 2001-05-07T09:40:09+09:00 Subject: [ruby-talk:14750] Re: Class refresher please. Hi, Though my question could go to a separate thread but since we're on the topic of 'Ruby is dynamic', let's check whether my assumption is correct. If a instance variable is created at run-time, there can be no instance variable with the same name in both sub-class and super-class. Because they could share the same space. I.e. programmer who uses library by others have to be very careful not to overwrite what the super-class has. That's tough without peeking into the source! Please let me know that I'm wrong. I really hope Ruby will handle that for me. Chochain Dave Dunkin wrote: > Ruby is a dynamic language and code is evaluated at run time. A super > class can call a method of a sub class because the code that does the > calling is not checked until run time, when that method call is valid. > I'm pretty sure that's how it works. > Dave > On Friday, May 4, 2001, at 06:41 PM, John Kaurin wrote: >> I re-read Chapter 19 in Programming Ruby, but could not >> find an explanation of a super class' method recognizing a >> base class' method. I am not clear why this is valid (C++ >> code would choke in the compile phase). I assume it has >> something to do with how instances are constructed in Ruby, >> but you know what happens when you assume.