Why can't I call Enumerable#reduce(sym)
without parentheses like the following?
>> [1, 2, 3].reduce :+
?>
While using parentheses results in this:
>> [1, 2, 3].reduce(:+)
=> 6
Am I accidentally calling Enumerable#reduce {| memo, obj | block }
instead?
Furthermore, why does this happen?
>> [1, 2, 3].reduce &:+
?> ^C
>> [1, 2, 3].reduce(&:+)
=> 6
Thanks a lot!