In Ruby, why does inspect() print out some kind of object id which is different from what object_id() gives?
The default implementation of inspect calls the default implementation of to_s, which just shows the hexadecimal value of the object directly, as seen in the Object#to_s docs (click on the method description to reveal the source). Meanwhile the comments in the C source underlying the implementation of object_id shows that there are different “namespaces” for … Read more