"Jess Gabriel y Galn" <jgabrielygalan / gmail.com> wrote in post #1113505:

> 2.- More functional styles:
>
> 2.0.0p195 :029 > a.inject(0) {|total, x| total + x}
>  => 10
> 2.0.0p195 :030 > a.inject(:+)
>  => 10
>

there is a difference:

[].inject(0) {|total, x| total + x}
  => 0
[].inject(:+)
 => nil

so i think this would be the best:

[].inject(0,:+)
 => 0