This is a modified version of dot.rb from Dave Thomas's rdoc project. I renamed it to rdot.rb to avoid collision with an installed rdoc/dot.
It also supports undirected edges.