From: 7stud -- Date: 2008-03-30T18:38:43+09:00 Subject: Re: inject's pathological case... David A. Black wrote: > > Actually the block isn't being called: > I guess that's all it can do > since it doesn't have enough elements to call the block even once. > To add to that, on p.456 of pickaxe2 it says that if you don't supply an argument for the inject call, then the first element in the enumerable becomes 'a', and it is not included in subsequent iteration. Apparently, because there are no values to iterate over, the block does not execute. -- Posted via http://www.ruby-forum.com/.