That's the same thought that I had.  Assuming that any? didn't exist,  m still fearful of adding methods to core classes. I think core  
classes should only be modified in special cases, like building a  
framework.

How do the rest of us feel about this?

- Philip

On Oct 24, 2007, at 12:16 AM, Jes Gabriel y Gal wrote:

> On 10/24/07, James Koppel <jamesbkoppel / yahoo.com> wrote:
>>  I then wrote the simple Array#some method that returns true if  
>> the given
>> predicate returns true for at least one of its elements, which I  
>> used to write
>> TimeWindow#incude?.
>
>> class Array
>>   def some
>>     each {|el| return true if yield el}
>>     false
>>   end
>> end
>
> Isn't this the same as Enumerable#any?
>
> Jesus.
>