Hans Mackowiak <lists / ruby-forum.com> wrote:
> tamara is wrong :: works with anoymous classes too:

It happens a lot :)

> c = Class.new {
>   def hello
>     p self.class.constants
>     p self.class::C_0
>   end
> }
> 
> c::C_0 = "set with ::" #=> "set with ::"

Oh, crikey!! Of course that works. Thanks, Hans. :)

> c0 = c.new #=> #<#<Class:0x00000002d032f0>:0x00000002d08228>
> 
> c0.hello
> #[:C_0]
> #=> "set with ::"

I don't know why I was thinking the constant had to be set from the
*instance*. Now I look at it, of course that makes no sense.

(still nottabug)