Today, one ofmy colleagues talked about to_s and to_str. He didn’t make it clear. Let me show you a simple example:

class Integer
  def to_str
    'it behaves like a string'
  end
end
puts '9' + 1

> 9it behaves like a string