From: Gavin Sinclair Date: 2004-03-03T20:47:57+09:00 Subject: Re: Why do inner methods count in outer scope? On Wednesday, March 3, 2004, 5:44:46 PM, Charles wrote: > def foo(x) > def bar(n) > n + 1 > end > bar(x) > end foo(5) # ->> 6 bar(5) # ->> 6 > Why is bar escaping the scope of foo? Is this a bug, or an unintended > feature? Heh, I thought "def inside def" wasn't even allowed! Gavin