Hi,

In message "Re: strange behavior"
    on 02/01/30, Paul Brannan <paul / atdesk.com> writes:

|If a constant is visible in an outer class, is there a good reason for
|having that constant not be visible in the inner class? (as in the
|original example)

I don't think so.  It makes constants globally scoped (well, mostly).
Those rules provide you the "illusion" of statically scoped constants.

  module C
    CC = 1
  end

  module A
    include C
    puts CC     # accessible because A includes C
    AA = 2
    module B
      puts AA   # accessible because B in the scope AA is defined
      puts CC   # no CC in ancestors, nor outer scope
    end
  end

For most of the cases, static scope is better than dynamic scope.

							matz.
p.s.
For most of the cases, dynamic typing is better than static typing.