You are not telling us what your desired result is!

Do you expect b.contains(h) to be false or true?

Of course h is a different object, even when it field name has same value as 
other objects already included to set.

My assumption is that default hash is based on address of ref objects, so 
objects are different by default. To make objects of different addresses equal 
when name is equal, you have to redefine hash() and == procs. But I can not 
remember details and I may confuse that with other programming languages, you 
may have to consult the api docs. 

Reply via email to