From: Rick DeNatale Date: 2007-11-17T01:30:59+09:00 Subject: Re: What is the correct way to check for existence of virtual class? On Nov 16, 2007 8:47 AM, Voroztsov Artem wrote: > One can write: > > class Object > def singleton_class > class < end > end > > puts "aaa".singleton_class > puts 8.singleton_class > > Is it the assumed way to do the job? There's a bit of a Heisenberg problem here, in that the act of measuring alters the result. Singleton instance classes aren't created until they are needed, but one of the things which creates them is class <