Merge: A more POLA to_s on Collection
authorJean Privat <jean@pryen.org>
Sun, 14 Jun 2015 01:10:09 +0000 (21:10 -0400)
committerJean Privat <jean@pryen.org>
Sun, 14 Jun 2015 01:10:09 +0000 (21:10 -0400)
As announced in #1385, this PR change the default `to_s` on collections.

Before: `[1, 2, 3].to_s == "123"`
After: `[1, 2, 3].to_s == "[1,2,3]"`

The main issue is for code that used `to_s` on array to get a fast concatenation.
Those should now use `plain_to_s` (or `join("")`).

Close #off-line issue signaled by @ablondin

Note: this PR fails on bootstrap (`to_s` is used internally) thus requires that `c_src` is regenerated.

Pull-Request: #1424
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>


Trivial merge