From: GOTO Kentaro Date: 2002-09-21T14:58:26+09:00 Subject: Re: Patch to add a Module#const_missing method At Fri, 6 Sep 2002 21:49:54 +0900, Jan Arne Petersen wrote: > > Already we have autoload, and it can be considered a special > > form of const_missing, I guess. > > The problem with autload is that you have to register the name of the > constants first and you cannot call a proc on request but only 'require' > a specific file. > > In contrast 'const_missing' can be used to create classes on demand if > you don't know the name before it is requested and you can execute any > code in the 'const_missing' method. I thought this problem again last night. Then I got believed that const_missing is superior option. * autoload can be defined by const_missing but the coverse cannot. So we can exile autoload from built-ins. * attr_missing looks quite different matter, as Dave said. But I have a question about const_missing spec. module M class<