From: Chad Fowler Date: 2005-08-12T05:48:02+09:00 Subject: Re: Dear RubyGems: Perhaps a better way to override require... On 8/11/05, Trans wrote: > Hi Chad, > > I have a library that allows one to require individual methods by name. > Unfortuantely some file systems have punctuation limitations on file > names, so I need to "escape" the names and then override Kernel#require > to take that into account. I did it the tradiional way using alias, but > for that caused conflicts with RubyGems, which does the same thing. In > figuring out what to do about it I hit on the above solution. > > I simply thought you might like to know about this, since it seems to > be a more robust solution. Also, I just wanted to be sure I didn't > overlook something, i.e. if anyone else sees a problem this way of > doing it. > > Ahh, I get it. The point (that I missed) wasn't the actual implementation of require but the fact that you were overriding it using a mixin instead of an alias. Seems reasonable. I don't see any obvious problems either, but I'd let the question linger here....anyone else? -- Chad Fowler http://chadfowler.com http://rubycentral.org http://rubygarden.org http://rubygems.rubyforge.org (over 700,000 gems served!)