Skip to content

Instantly share code, notes, and snippets.

@lian
Created November 6, 2013 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lian/7346345 to your computer and use it in GitHub Desktop.
Save lian/7346345 to your computer and use it in GitHub Desktop.
h = Hash.new{|h,k| h[k] = 0 }; ObjectSpace.each_object{|o| h[o.class] += 1 }; p h.sort_by{|k,v| -v}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment