Answer by Catherine for How to print the memory location of a Ruby object
I don't know why would you want such a feature, and this is very implementation-specific, but on MRI 1.9 you can (ab)use object_id:ruby-1.9.2-p180 :022 > class A; end => nil ruby-1.9.2-p180 :023...
View ArticleHow to print the memory location of a Ruby object
Is there a way to print out the memory location of a Ruby object, not from puts self as I want to have a custom to_s method and print the memory pointer location as one of the pieces of information to...
View Article