Le 16 mars 2011 à 22:55, Robert Pankowecki a écrit :

> [ 1, 1, 2 ].uniq? { |x| x > 1 } # select
> Could mean: Is it true that all objects greater than 1 are unique ?
> 
>> [ nc,dhh ].uniq_by? { |p| p.name } # map
> Could mean: Is it true that all objects have unique names ?
> 
> But I am not in favor of adding those methods. Just trying to
> understand your scenarios.

Yes it's what I was trying to do. The only is to add 2 methods. Method names 
you chose sound good to me.

Why don't you want these methods to be added?
-- 
Nicolas Cavigneaux
http://www.bounga.org
http://www.cavigneaux.net



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to