mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fixing typo that crept in 2c8938f
This commit is contained in:
parent
5683d6883b
commit
f1eb69c5b2
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in a new issue