The compare_by_identity?() is an inbuilt method in Ruby returns true if the set will compare its elements by their identity.
Parameters: The function does not takes any parameter.
Return Value: It returns true if the set will compare its elements by their identity..
false false false
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.