From: Michael Garriss Date: 2003-09-14T14:33:39+09:00 Subject: Re: Dot versus double-colon Hal Fulton wrote: > Even though it looks almost like recursion. Hmm, that raises > the question of why/how this works. > > And another issue is: One *could* write a little module that, > when included in a class, exposed all the class's constants in > this way. Within five minutes I had it "almost" working. I'll > bet someone in another timezone or with more caffeine could > have it working in three. Anyone? > > Hal module Dot def Dot.append_features( mod ) mod.constants.each{|c| mod.class_eval( "def self.#{c}() #{mod}::#{c} end" ) } end end Hmm....you're right, it is late and this isn't well tested. Michael