From: Charles Oliver Nutter Date: 2008-12-04T03:01:33+09:00 Subject: [ruby-core:20264] Re: Behavior: autoload calls rb_require() directly Paul Brannan wrote: > On Wed, Dec 03, 2008 at 11:49:49PM +0900, Charles Oliver Nutter wrote: >> require plugins would only advise the require process of additional >> paths, extensions, what have you. They would not perform the actual >> load. Yes, it would still be order dependent, but any plugin in the >> chain could opt out of finding a library and allow the other mechanisms >> to fire. > > How is that different from overriding require, which also allows > opt-out? If someone installs a new require that doesn't call the old one, the entire chain breaks. With a plugin, the require process would be pulling from the plugins, and a nil result means the next in the chain is tried. The only way to stop the sequence would be to successfully return a result. > Also, I thought on 1.9 rubygems was no longer using the require hook, > but instead modifying $:? (at least, that's what I remembered coming > out of the discussion at 2007 rubyconf) I don't know. - Charlie