In Ruby I can use
result << (yield element)
and everything works, but if I do
result.push(yield element)
I get a warning about needing parentheses for future compatibility. I can change the above to
result.push(yield(element))
and the interpreter is happy again, but I don't understand why I need parentheses in one call to yield and not the other?