If both a method and a variable has the same name it will use the variable.
hello = \"hello from variable\"
def hello
\"hello from method\"
end
puts hell
The ambiguity between local variables and methods only arises for receiverless message sends with no argument list. So, the solution is obvious: either provide a receiver or an argument list:
self.hello
hello()
See also