From: Tamara Temple Date: 2013-06-03T04:02:14+09:00 Subject: Re: Is it a bug(about constant reference on dynamic class). Hans Mackowiak 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 #=> #<#: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)