From: 7stud -- Date: 2009-09-15T11:15:22+09:00 Subject: Re: .map.with_object(3){|v|v+3} #=> 3 Is this a bug? David Masover wrote: > On Sunday 13 September 2009 09:19:31 pm ErMaker wrote: >> => [4, 5, 6] > That makes sense, now that I know what with_object does. > Could you enlighten me? The following doesn't yield any clues: $ri19 Enumerator#with_object ------------------------------------------------- Enumerator#with_object e.with_object(obj) {|(*args), memo_obj| ... } e.with_object(obj) From Ruby 1.9.1 ------------------------------------------------------------------------ Iterates the given block for each element with an arbitrary object given, and returns the initially given object. If no block is given, returns an enumerator. -- Posted via http://www.ruby-forum.com/.