I have a script that iterates using ObjectSpace#each_object with no args. Then it prints how many instances exist for each class.
ObjectSpace#each_object
I realized that some
(class << object; self; end).superclass