This project is archived and is in readonly mode.

#6588 new
Bounga

Add Enumerable#uniq?

Reported by Bounga | March 16th, 2011 @ 11:17 AM

Checks for Enumerable content uniqueness

Returns true if the collection has no duplicated content.
Can be called with a block too, much like any?, so people.uniq? { |p| p.age > 26 } returns true if only 1 person is over 26.

Unit test are included.

Please test and +1 this useful tiny patch.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages