Let's see the following code.
def times_two(arg1);
puts arg1 * 2;
end
def sum(arg1, arg2);
puts arg1 + arg2;
end
times_two 5
times_two(5)
times_two (5)
sum 1, 2
sum(1, 2)
sum (1, 2)
when call the functions above, which returns error?
Result...
10
10
10
3
3
SyntaxError: (irb):14: syntax error, unexpected ',', expecting ')'
sum (1, 2)
^
Why??
Because there is a space between function and parenthesis of arguments, Ruby parser find it as a single argument, but it is invalid, so returned error.