
Enumerable's any? method broken in Datamapper::collection
Reported by Daniel Tsui | December 31st, 2008 @ 04:39 PM
The block passed is being ignore and any? is always returning true. It seems to be only broken when using any? with a collection through an association. Maybe the method is being overriden somewhere.
I have a model Person has many Memberships, In irb:
Person.all.any? { |p| p == false } This works fine and would return false
Person.memberships.any? { |p| p == false } This still would return true.
Comments and changes to this ticket
-
Dan Kubb (dkubb) January 8th, 2009 @ 02:48 PM
- State changed from unconfirmed to accepted
- Assigned user set to Dan Kubb (dkubb)
-
Jonathan Stott (namelessjon) February 22nd, 2009 @ 11:55 AM
- State changed from accepted to resolved
This doesn't seem to be a problem in 0.10.0 (see attached test)
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »