From: nobu.nokada@... Date: 2004-12-03T11:47:32+09:00 Subject: Re: nested defs, what if... Hi, At Fri, 3 Dec 2004 08:20:34 +0900, trans. (T. Onoma) wrote in [ruby-talk:122265]: > Well, it's an idea, but I don't think a very good one. In general I don't > think this is useful, and would rather obfuscate code if actually used. I > think what would be more useful is if such methods were local methods, like > local variables: I also have thought the idea, though haven't implemented it. I'm still worndering whether this should be valid or error. class A def a(y) def b(x) x + y # `y' in a or `undefined local variable'? end 10.times{ |i| print b(i) } end end -- Nobu Nakada