From: Thomas Enebo Date: 2008-12-04T03:04:24+09:00 Subject: [ruby-core:20265] Re: Behavior: autoload calls rb_require() directly Dave Thomas wrote: > > On Dec 2, 2008, at 1:08 PM, Yehuda Katz wrote: > >> However, that is *not* currently the implementation, and it could >> introduce bugs to change the behavior now. >> >> Merb, for instance, uses rubygems (which overrides require) as well >> as autoload. Modifying the behavior to use the overridden require now >> would probably produce some changes in behavior, especially since >> rubygems is in common use and overrides require. Rails also overrides >> require. >> > > And Matz is saying the, if nothing else is agreed, that behavior will > be an implementation-detail, and not part of the standard. Wouldn't it > be better to swallow a smaller pill now and standardize on _something_? Absolutely! Matz pick what you want on this...please :) One way or the other is reasonable, but changing the behavior from MRI's current implementation will break something. Also, the docs say that autoloads will be loaded via Kernel#require. So either the documentation is bugged or the implementation is. A patch should be the result of this thread one way or another. Rubinius could work around this and have an internal_require which would not be a method any framework would routinely redefine. Someone could go crazy and override that, but then that would be their funeral. I think Evan is just asking for an answer on this...right Evan? This is not really a limitation of Rubinius. -Tom