Hi,
In message "[ruby-talk:15635] Re: Q: Function modification/Procedures"
on 01/05/24, Dave Thomas <Dave / PragmaticProgrammer.com> writes:
|I'm not sure if there's a parsing reason that you can't overload '()'.
Because "ultimate.answer(42)" is considered as "invoke method `answer'
of the value `ultimate', with argument 42". See? This is something
different from "evaluate `ultimate.answer' then invoke its returned
function object, with argument 42".
In Ruby, we can call a method whose name is also a local variable.
print = 36
print print, "\n"
matz.