From: Francis Hwang Date: 2002-06-18T02:46:36+09:00 Subject: problem with inner classes I'm having a problem defining inner classes. The outer class is a child of another class, which makes reusing the name for defining inner classes a little cumbersome. For example, if the outer class is: class OuterClass < AbstractOuterClass ... end and in InnerClass.rb I have: class OuterClass class InnerClass ... end end I get the following error: warning: already initialized constant OuterClass ... which I'm assuming comes from the fact that the interpreter thinks I want to redefine OuterClass as having no parent. If I change my InnerClass code to class OuterClass < AbstractOuterClass class InnerClass ... end end ... then it works. Which is fine, except I have maybe 20 inner classes and I'd rather not duplicate the OuterClass inheritance in each file. Any ways I can get around this? Thanks, Francis