6 ms·
Is that semantic difference documented anywhere? I’ve never heard of this before, would love to learn more.
by kddeisz 5y ago
Is that semantic difference documented anywhere? I’ve never heard of this before, would love to learn more.
- dragonwriter 5y agoThe official documentation for the implicit conversion protocol (which to_str is part of, as distinct from to_s) is here: https://ruby-doc.org/core-3.0.2/doc/implicit_conversion_rdoc.html https://ruby-doc.org/core-3.0.2/doc/implicit_conversion_rdoc... to_s is documented here: https://ruby-doc.org/core-3.0.2/Object.html#method-i-to_s https://ruby-doc.org/core-3.0.2/Object.html#method-i-to_s
- deleted 5y ago[deleted]