Ruby novice, ask Great Xia for advice.
To_s should be a widely available method, to_str should be a String or a method that is unique to a few classes. Ruby does have many ways,https://ruby-china.org/topics/25311.
The inspect return type is string, which returns a string that shows the current object for easy reading. Nil.inpsect return
"nil"Because he is returning
"nil"Look at the NilClass#inspect document.