From: Intransition Date: 2013-01-10T22:20:09+09:00 Subject: Re: Re-implementing Autoload ------=_Part_266_30923629.1357823320798 Content-Type: multipart/alternative; boundary="----=_Part_267_12637678.1357823320805" ------=_Part_267_12637678.1357823320805 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Thanks Xavier. I realize implementation differs. Clearly I can't tap into the underlying constant resolution with pure Ruby. But I expected that I should be able to emulate it effectively with const_missing --I would think it would possible to get essentially the same results. The only difference I am sure about at this point, is that I haven't been able to find a way to get `Module.nesting`, instead I had to resort to Constant#name and splitting it up. Yet I thought this would give me a superset of current functionality, not a subset. i.e. class Foo HERE = "here" class Bar::Baz HERE end end Ruby's constant lookup would not find HERE, my code would. Obviously, I am still missing something. And maybe you are right, that it is not possible (which would be sad, imo). I just wish I knew what it was. ------=_Part_267_12637678.1357823320805 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks Xavier. I realize implementation differs. Clearly I can't tap into t= he underlying constant resolution with pure Ruby. But I expected that I sho= uld be able to emulate it effectively with const_missing --I would think it= would possible to get essentially the same results.

The only differ= ence I am sure about at this point, is that I haven't been able to find a w= ay to get `Module.nesting`, instead I had to resort to Constant#name and sp= litting it up. Yet I thought this would give me a superset of current funct= ionality, not a subset. i.e.

    class Foo
 &= nbsp;    HERE =3D "here"
      c= lass Bar::Baz
        HERE
 &= nbsp;    end
    end

Ruby's constan= t lookup would not find HERE, my code would.

Obviously, I am still m= issing something. And maybe you are right, that it is not possible (which w= ould be sad, imo). I just wish I knew what it was.

------=_Part_267_12637678.1357823320805-- ------=_Part_266_30923629.1357823320798--