tamara is wrong :: works with anoymous classes too:

c = Class.new {
  def hello
    p self.class.constants
    p self.class::C_0
  end
}

c::C_0 = "set with ::" #=> "set with ::"

c0 = c.new #=> #<#<Class:0x00000002d032f0>:0x00000002d08228>

c0.hello
#[:C_0]
#=> "set with ::"

-- 
Posted via http://www.ruby-forum.com/.