Mike Harris <GENIE / prodigy.net> wrote:
> Also, with #2, obviously your way works, but the &&= isn't neccesary,
> a && has the intended effect, since the result of the block is put in
> the accumulator.  Again, it doesn't matter at all, I'm mostly just
> writing to avoid doing work.

In that case order should be reversed to avoid short circuiting altogether 
(in this case it does not matter as the test has no side effects, but if it 
had...)

>> (1..5).inject(true) { |retval, i| puts i; i < 3 && retval}
1
2
3
4
5
=> false

Kind regards

    robert