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)
commit0c1547a7cbc25ac7b895c08fb81ce3ec82ae6fbf
treeb831b6374f262375cc6d78550ed59ea75048d0fe
parentac69569087f77def9b4d452d3ee26c0c3301f676
parent783721598c831c72ef04b7cdc712113557471908
Merge: lib/graph: Fix `to_dot`

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>