uniq()
Returns a new array by removing duplicate values in self.
See also Array#uniq.
static VALUE enum_uniq(VALUE obj) { VALUE hash, ret; rb_block_call_func *const func = rb_block_given_p() ? uniq_iter : uniq_func; hash = rb_obj_hide(rb_hash_new()); rb_block_call(obj, id_each, 0, 0, func, hash); ret = rb_hash_values(hash); rb_hash_clear(hash); return ret; }