7
7stud --
Hi,
This example is from pickaxe2(I can't find the page):
def toggle
def toggle
puts "subsequent"
end
puts "first"
end
toggle
toggle
toggle
--output:--
first
subsequent
subsequent
Can someone explain why the nested method hides the outer method?
Thanks.
This example is from pickaxe2(I can't find the page):
def toggle
def toggle
puts "subsequent"
end
puts "first"
end
toggle
toggle
toggle
--output:--
first
subsequent
subsequent
Can someone explain why the nested method hides the outer method?
Thanks.