From: matz@... (Yukihiro Matsumoto) Date: 2003-10-20T18:24:45+09:00 Subject: Re: Enumerable#inject is surprising me... Hi, In message "Re: Enumerable#inject is surprising me..." on 03/10/07, dblack@superlink.net writes: |> > ['a'].inject(''){break 'b'} # => 'b' |> |> But this doesn't work as Nathaniel expected. It returns last |> iteration value, "". | |I'm not sure why it would be "". Wouldn't that only happen if the |empty string (the inject accumulator) appeared as the last value in |the block? It's a bug. I fixed it in the latest CVS. matz.