Why is it that the following code runs fine
p (1..1000).inject(0) { |sum, i|
sum + i
}
But, the following code gives an error
p (1..1000).inject(0) do |sum, i|
sum + i
end
warning: do not use Fixnums as Symbols
in `inject': 0 is not a symbol (ArgumentError)
Should they not be equivalent?