instance method
Set#compare_by_identity
() -> self
compare_by_identity → self
set.c
View on GitHub ↗
static VALUE
set_i_compare_by_identity(VALUE set)
{
if (RSET_COMPARE_BY_IDENTITY(set)) return set;
if (set_iterating_p(set)) {
rb_raise(rb_eRuntimeError, "compare_by_identity during iteration");
}
return set_reset_table_with_type(set, &identhash);
}
Makes the set compare its elements by their identity and returns self.