From: "Weirich, James" Date: 2003-10-07T08:39:34+09:00 Subject: Re: Enumerable#inject is surprising me... > Does it surprise you? > > irb(main):001:0> ['a'].inject{break 'b'} > => "a" Inject works on pairs of elements. Since your list has only one element, there are no pairs. You can force one pair in the above example by explicitly supplying an initial element ... ['a'].inject(''){break 'b'} # => 'b' But even that will break down when you have an empty list. -- -- Jim Weirich / Compuware -- Fidelity/FWP Capture Services -- Phone: 859-386-8855