What is the best way to detect recursive method calls? Perhaps it can be done in this format:
def foo
if some_code_to_detect_recursive_call
...
else
...
end
end
I can think of a way to parse the information caller
, but I'm curious to see if there are better ways.
source
to share