From: Stefan Mahlitz Date: 2006-01-20T02:47:54+09:00 Subject: Re: Help for upgrading my sources from ruby 1.6.8 to 1.8.x nobu@ruby-lang.org wrote: >> 2. question: >> Because we are developing for railway organizations, we have a >> track-element called "Signal". Therefore we have also created a >> corresponding class Signal (using it a long time and in many >> applications). This is in conflict with ruby 1.8. >> Do we have any chance to omit the change of the class name to be >> compliant with 1.8? > > module Railway > class Signal > end > end But code using Signal::SomeConstant will have to be changed to Railway::Signal::SomeConstant module Railway class Signal SomeConstant = "FOO" end end p Railway::Signal::SomeConstant # prints "FOO" include Railway p Signal::SomeConstant # raises a name error NameError: uninitialized constant # Signal::SomeConstant One can do module Signal SomeConstant = Railway::Signal::SomeConstant end