_id2ref

ObjectSpace._id2ref(object_id) รข an_object
Class Public methods

Converts an object id to a reference to the object. May not be called on an object id passed as a parameter to a finalizer.

s = "I am a string"                    #=> "I am a string"
r = ObjectSpace._id2ref(s.object_id)   #=> "I am a string"
r == s                                 #=> true
doc_ruby_on_rails
2015-04-24 12:43:31
Comments
Leave a Comment

Please login to continue.