"Christoph"  wrote
....

- ups;)

---
anon = Class.new

class A; end

anon.class_eval  %{
                        # ^^^
    @my_name = "anon"
    def inst_meth
         puts "an inst"
    end
    Const  = "anon's_const"
     def A.const
        puts Const
    end
}

class << anon
    def my_name
        puts @my_name
    end
end

anon.new.inst_meth # an_inst
anon.my_name        # anon
A.const                    # anon's_const
---

/Christoph