Hi --

I notice that select without a block returns an enumerator in 1.9. I'm
wonder if there's any use case for this -- in other words, any reason
you would ever do this:

   array.select.some_method

Also, it means that you get an enumerator instead of an error message
if you do (presumably by accident) this:

>> a = [1,2,3,4,5]
=> [1, 2, 3, 4, 5]
>> puts a.select do |x| x > 3 end
#<Enumerable::Enumerator:0x3b7fcc>

I know that something similar will happen with map and others, but if
there's no real reason to get an enumerator, I'd prefer that select
complained about not having a block.


David

-- 
Rails training from David A. Black and Ruby Power and Light:
     Intro to Ruby on Rails  July 21-24      Edison, NJ
  *  Advancing With Rails    August 18-21    Edison, NJ
  * Co-taught by D.A. Black and Erik Kastner
See http://www.rubypal.com for details and updates!