From: Chris Hulan Date: 2011-05-11T04:00:30+09:00 Subject: Re: Enumerable#find returns an enumerator? On May 10, 2:48 pm, Roger Pack wrote: > Hello all. > I would have expected that > > [1,2,3].find(3) > > just return me the element 3, not an enumerator, since it will at most > return me one item, so it doesn't seem very "enumerable" to me (at most > one item). > > Thoughts? > -r > > -- > Posted viahttp://www.ruby-forum.com/. if there were more than 1 occurrence retuning an enumerator makes sense, but there is Enumerable::find_all that sounds better suited to that behavior Guess you use the block instead? [1,2,3].find{|x| x == 3} cheers