class RSpec::Mocks::Space
def id_for(object)
def id_for(object) id = object.__id__ return id if object.equal?(::ObjectSpace._id2ref(id)) # this suggests that object.__id__ is proxying through to some wrapped object object.instance_exec do @__id_for_rspec_mocks_space ||= ::SecureRandom.uuid end end