inspect
is used more for debugging and to_s
for end-user or display purposes.
For example, [1,2,3].to_s
and [1,2,3].inspect
produce different output.
inspect
is used more for debugging and to_s
for end-user or display purposes.
For example, [1,2,3].to_s
and [1,2,3].inspect
produce different output.