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)
commite5ae2fecd24aeecd16ae71522d045b22f89b4478
tree294d70f0af4ea3a9c2672f825bc64c4afa98cc51
parent2edb3cd40ed0e6c5b04ec31c7767121370fc7327
parentb21e316cf27691d9fc5d116853f0c6e362870ddd
Merge: A more POLA to_s on Collection

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>