Skip to content

Commit

Permalink
fixing typo that crept in 2c8938f
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed Dec 23, 2010
1 parent 5683d68 commit f1eb69c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,7 @@ The +inject+ method offers iteration with an accumulator:

<ruby>
[2, 3, 4].inject(1) {|product, i| product*i } # => 24
</rubyproduct
</ruby>

The block is expected to return the value for the accumulator in the next iteration, and this makes building mutable objects a bit cumbersome:

Expand Down

0 comments on commit f1eb69c

Please sign in to comment.