On Wed, Nov 4, 2009 at 4:19 PM, Intransition <transfire / gmail.com> wrote:
> I want to suggest Hash#count be defined such that it counts hash
> values. A it stands (using Enumerable#count) it only can ever return 0
> or 1.
>
> Current:
>
>  ¨Âºá½¾±¬ºâ½²¬ºã½¾±ý®ãïõîô¨Ûºá¬±Ý£½>  ¨Âºø½¾±¬ºâ½²¬ºã½¾±ý®ãïõîô¨Ûºá¬±Ý£½>  ¨Âºá½¾±¬ºâ½²¬ºã½¾±ý®ãïõîô¨±© ½¾ >


{:a=>1,:b=2,:c=>1}.count{|x| x[1]==1}      #=> 2


-- 
Paul Smith
http://www.nomadicfun.co.uk

paul / pollyandpaul.co.uk