# Re: Time Window (#144)

**URL:** <https://www.ruby-forum.com/t/re-time-window-144/118225>\
**Category:** Ruby\
**Created:** [October 24, 2007, 11:17pm UTC](https://www.ruby-forum.com/t/re-time-window-144/118225 "2007-10-24T23:17:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jameskelly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3ab097/32.png) [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Post date:** [October 24, 2007, 11:17pm UTC](https://www.ruby-forum.com/t/re-time-window-144/118225/1 "2007-10-24T23:17:01Z")

</div>

Thanks; I wasn’t aware of that method’s existence.

Actually, I wasn’t aware that Enumerable existed in the cor; its entry  
in the standard library section on Rubydoc contains no reference to this  
method. Has it been added there since I first looked, in (if I remember  
correctly) version 1.8.4?

----- Original Message ----  
From: Jesús Gabriel y Galán [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: ruby-talk ML [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Wednesday, October 24, 2007 2:16:46 AM  
Subject: Re: [QUIZ] Time Window (#144)

On 10/24/07, James K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.

---

<div class="post-metadata">

**Author:** ![jameskelly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3ab097/32.png) [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Post date:** [October 24, 2007, 11:35pm UTC](https://www.ruby-forum.com/t/re-time-window-144/118225/2 "2007-10-24T23:35:10Z")

</div>

This raises one of my few frustrations with ruby. I find ruby far  
easier to work with than Java in general, but the main advantage java  
has is great auto-generated documentation. Both Javadoc and  
autocompletion in IDEs feel superior to what ruby has to offer.
