Eric Schwartz wrote:
> $ cat testharness.rb
> module TestHarness
>    def AddHref(url, text)
>       "<a href='#{url}'>#{text}</a>"
>    end
> end
> 
> $ cat testview.rb
> require 'testharness'
> 
> module TestHarness
>   class Bah
>      def myprint
>         puts AddHref('http://www.google.com/', 'Google')
>      end
>   end
> end
> 
> TestHarness::Bah.new.myprint

Try this:

class Bah
   include TestHarness
   def myprint
   ...
   end
end

Method lookup doesn't go thru enclosing modules, just included modules 
(and superclasses, of course).

However, constant lookup *does* look thru enclosing modules, in addition 
to included modules and superclasses:

module M
   X = 1
   class C
     def foo
       p X
     end
   end
end

M::C.new.foo  # ==> 1