From: Todd Benson Date: 2008-12-01T04:33:24+09:00 Subject: Re: Help me understand how this block works? On Sun, Nov 30, 2008 at 1:13 PM, Brian A. wrote: > Thank you, that explains it very well for me. Another quick question. > Would it be possible to inject to two different vars? You apply #inject on an Enumerable object. Do you mean that you want to iterate over two arrays at the same time? > > For instance if something like (syntax is probably wrong if its even > possible): > > (5..10).inject(1).inject(2) {|product, variable_two, n| product * > variable_two * n} I can't tell what you are trying to accomplish here, but your Enumerable can hold any object (like Arrays, etc.) Todd