It's not really a memory location. It's just an object id. Yes it's useful to see if two objects are really the same exact object, which is kind of similar to a memory location, but for example, there is a object id of 1.
ObjectSpace._id2ref(1).object_id
=> 1
That's hardly a memory location. :)
ObjectSpace can do some interesting things, none of which should probably be used in normal programming.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's not really a memory location. It's just an object id. Yes it's useful to see if two objects are really the same exact object, which is kind of similar to a memory location, but for example, there is a object id of 1.
ObjectSpace._id2ref(1).object_id
=> 1
That's hardly a memory location. :)
ObjectSpace can do some interesting things, none of which should probably be used in normal programming.