From: Trans Date: 2005-11-07T13:32:11+09:00 Subject: Re: Namespace pollution in Rails > I agree with what you are saying, in fact I think libraries that > do this should be removed - and that is what they have done > in response to my requests at Textdrive. Strangely, I installed > the latest version of Nitro and Glue and both irb and the > Rails console environments were inaffected. It must have been > an older version of Glue, but it still beats me how this came about. > Irb showed no pollution, only when running a Rails app did there > suddenly appear a loaded Glue module. > > This is why I am so curious about it - how did Glue get itself loaded? Unfortuately require doesn't record absolute paths (fixed in 1.9) and Gems can have subtle effects on how things get required. So between the two there's a name clash somewhere. That seems to be a bad tendency of such "full-stack" solutions. They tend to think they own the entire relam of namespaces. I recall once someone suggesting Ruby use variable's for module loads rather then static constants. That would have helped, but such is life. Presently I'm working with George to help seal up issues on the Glue side as time permits. > I'd like to be able to circumvent such things in future, it is > impossible to code around every possible class people dream up > and Glue even modified the default String class! Well, thats' not neccessarily bad. As long as one's only adding methods (and documenting them!) it should be okay. The serious problems araise when one changes pre-established behaviors. That's why there is such a clamor for namespace selectors these days. T.