From: Matthew Harris Date: 2006-07-25T00:52:22+09:00 Subject: Re: Autoloading objects — Ruby equivalent for PHP5 "__autoload You would probably want to use some metaprogramming to define const_missing recursively on currently defined constants, and then it's pretty much the same as PHP's __autoload(). On 7/24/06, Alex Young wrote: > Alex Young wrote: > > > def Object.const_missing(name) > > load name.to_lower + ".rb" > > end > > > > That's got a few rough edges, though, to put it mildly... > > > I mean, besides the fact that it won't work, unlike Mat's. Should have > tested that one... > > -- > Alex > > -- Matt