I just came across an odd method in some Ruby code, and I'm wondering if I'm missing something fundamental. It looks like this:
def funny
!funny
end
What would this possibly return?
I just came across an odd method in some Ruby code, and I'm wondering if I'm missing something fundamental. It looks like this:
def funny
!funny
end
What would this possibly return?
It is a method labelled as being funny, which then contains !funny or literally, "not funny".
It recurses until there is a stack overflow.