From: Erik Veenstra Date: 2006-07-25T15:18:26+09:00 Subject: Re: Object to which a meta class belongs? It does work work, but... ... It's even slower. Much slower. ;] Thanks. gegroet, Erik V. - http://www.erikveen.dds.nl/ ---------------------------------------------------------------- CPU ELAPSED COUNT CPU/COUNT LABEL 5.850000 6.708499 1 5.850000 :singleton_of 0.560000 1.097820 1 0.560000 :belongs_to ---------------------------------------------------------------- class Module def singleton_of res = nil ObjectSpace.each_object(self) do |obj| res = obj end res end end ----------------------------------------------------------------