From: John Lam (DLR) [mailto:jflam / microsoft.com] 
> 2. Bad side effect during global constant assignment:
> 
> class C
> end
> 
> class << C
>   Bar = self
>   p name
> end
> 
> class D
> end
> 
> class << D
>   ::Foo = self
>   p name
> end

I think the following shows the bug slightly more clearly:

class E
  p name           #=> "E"
  class << self
    p name         #=> ""
    Foo = self
    p name         #=> ""
    ::Foo = self
    p name         #=> "Foo"
  end
  p name           #=> "E"
end