https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17097754782016-03-14T22:52:09ZRuby Issue Tracking SystemRuby master - Bug #12174: Interpolation ignores `to_s` (and `inspect`) when `to_s` is defined to `nil`.https://bugs.ruby-lang.org/issues/12174?journal_id=574302016-03-14T22:52:09Zsawa (Tsuyoshi Sawada)
<ul></ul><p>The description was too specific. Whenever <code>to_s</code> is defined to be not a string, the issue arises.</p> Ruby master - Bug #12174: Interpolation ignores `to_s` (and `inspect`) when `to_s` is defined to `nil`.https://bugs.ruby-lang.org/issues/12174?journal_id=574382016-03-15T02:30:29Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>Yes, to be interpolated into a string, <code>to_s</code> must return a string.<br>
Non-string object cannot be concatenated to a string.</p>