lib/perobs/ObjectBase.rb in perobs-4.2.0 vs lib/perobs/ObjectBase.rb in perobs-4.3.0
- old
+ new
@@ -100,9 +100,16 @@
else
_referenced_object.equal?(obj)
end
end
+ # To allow POXReference objects to be used as Hash keys we need to
+ # implement this function. Conveniently, we can just use the PEROBS object
+ # ID since that is unique.
+ def hash
+ @id
+ end
+
# Shortcut to access the _id() method of the referenced object.
def _id
@id
end