7stud -- wrote in post #998090:
>
> I guess the lookup actually starts at the toplevel.

Well, that's not true either.  If I define two All classes: one at the 
top level and one inside a module,

class All
  def greet
    puts 'All#greet'
  end
end

module C
  class All
     def greet
       puts "C::All#greet"
     end
  end

  class Dog
    def do_stuff
      All.new.greet  #<*****
    end
  end

end

C::Dog.new.do_stuff

--output:--
C::All#greet


Then if I delete C::All:

class All
  def greet
    puts 'All#greet'
  end
end

module C
  class Dog
    def do_stuff
      All.new.greet  #<*****
    end
  end
end

C::Dog.new.do_stuff

--output:--
All#greet


...which doesn't seem like that should work.

-- 
Posted via http://www.ruby-forum.com/.