On Jan 12, 2008, at 3:57 PM, Robert Dober wrote:

> ---     routines.inject(0){ |c,r| c + (r == o ? 1 : 0 ) } !=  
> MagicNumber
> +++ routines.grep(o).size != MagicNumber

I'm kind of surprised that works.  Neat.

However, I think inject() is preferable since it doesn't have to build  
up a possibly large Array just to get a count.

James Edward Gray II