From: Trans Date: 2008-08-17T11:40:32+09:00 Subject: Re: More autoload... On Aug 16, 4:28 pm, David Masover wrote: > That sucks. > > Is there any way to know for certain when a file is loaded, when it's autoload > that's doing it, short of modifying the file? (I'm specifically wanting to be > _notified_, so that I can prepare sub-constants to be autoloaded as well -- > that is, when Foo is loaded, I want to automatically run Foo.autoload :Bar.) > > Is there any way to force autoload to use a different mechanism? > > Is there any way, in Ruby, to emulate autoload with actual feature parity? > > Or am I really going to have to create a temporary file for each and every > source file I might possibly ever want to use? The things to do is of course to fix the Ruby source to A) use a callback for autoload and B) to use the normal Kernel.require call. Then submit a patch and pray the higher ups care enough to check it in. Now the question is are you a C coder ;) T.