Actions
Bug #12174
closedInterpolation ignores `to_s` (and `inspect`) when `to_s` is defined to `nil`.
Bug #12174:
Interpolation ignores `to_s` (and `inspect`) when `to_s` is defined to `nil`.
Description
Actions
Added by sawa (Tsuyoshi Sawada) over 10 years ago. Updated over 10 years ago.
Description
The description was too specific. Whenever to_s is defined to be not a string, the issue arises.
Yes, to be interpolated into a string, to_s must return a string.
Non-string object cannot be concatenated to a string.