I was debugging Mechanize the other day, and thought it would be handy to have a graph of objects in memory and they’re relationship with each other. So I put together a simple script that outputs a Graphviz file illustrating what the object points to. Here’s the code: require 'ograph' require 'rubygems' require 'mechanize' mech = WWW::Mechanize.new mech.get('http://google.com/') puts ObjectGraph.