Merge: lib/graph: Fix `to_dot`
authorJean Privat <jean@pryen.org>
Fri, 30 Dec 2016 20:27:32 +0000 (15:27 -0500)
committerJean Privat <jean@pryen.org>
Fri, 30 Dec 2016 20:27:32 +0000 (15:27 -0500)
The `Graph::to_dot` function seldom produced bad dot when used on objects with special formatting in their `to_s` method.

This PR changes that by overriding the ID of a node by an Int.
There is still the concern that the new implementation might explode when used on a very large graph, there might be a better way to generate it or to escape the node's ids, but I can't find another one at the moment.

Poke @ablondin, this might interest you

Pull-Request: #2349
Reviewed-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>


Trivial merge