Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Inspecting objects counts
objects = {}
p ObjectSpace.each_object{|obj| objects[obj.class] += 1}
pp objects.sort_by{|k,v| -v}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment