From: hipster Date: 2001-08-16T20:57:36+09:00 Subject: [ruby-talk:19888] Re: Why not?: Assigning to self On Thu, 16 Aug 2001 17:40:48 +0900, Pit Capitain wrote: [snip] > Take the famous Shape class hierarchy: > > class Shape; ...; end > class Rectangle < Shape; ...; end > class Square < Rectangle; ...; end > > Suppose you have a Rectangle instance and use one of its resizing > methods so that the new height equals the new width. After that it > would be nice if the Object had become a Square instance. > FYI: The C++ FAQ discusses an identical inheritance problem: circle vs. ellipse -- and provides some valuable insights along the way. http://www.parashift.com/c++-faq-lite/proper-inheritance.html#[21.6] Michel