3 ms·
Yes, to_s returns the string representation of an object. I think it's a safety measure in case the argument passed in is not a string, but can be turned into
by jimbokun 1y ago
Yes, to_s returns the string representation of an object.
I think it's a safety measure in case the argument passed in is not a string, but can be turned into a string. Safe to assume that calling "to_s" on a string just returns the string.