lib: Split collections into readable and writable
[nit.git] / src / metamodel / partial_order.nit
index 42a0525..4960a51 100644 (file)
@@ -68,7 +68,7 @@ special Collection[E]
        # Return a dot representation
        meth to_dot: String
        do
-               var s = new String
+               var s = new Buffer
                s.append(to_dot_header)
                for e in _elements do
                        s.append(to_dot_node(e.value))
@@ -77,7 +77,7 @@ special Collection[E]
                        end
                end
                s.append("}\n")
-               return s
+               return s.to_s
        end
 
        # Called to display the header