On 6/2/07, Rick DeNatale <rick.denatale / gmail.com> wrote: > On 6/2/07, Robert Dober <robert.dober / gmail.com> wrote: > > On 6/2/07, Robert Klemme <shortcutter / googlemail.com> wrote: > >Actually the current state of > > > affairs is a queer mix, because the definition is nested but the scope > > > is not (they are neither restricted to the current instance nor to the > > > current method). > > > > Robert I think they are: > > # vim: sts=2 sw=2 expandtab nu tw=0: > > > > class A > > def a > > def b > > 42 > > end > > end > > > > end > > > > p A.new.methods.grep(/^b$/) > > A.new.b > > [] > > nested.rb:13: undefined method `b' for #<A:0xb7e337a0> (NoMethodError) > > > > Did you overlook David's post? > > I get exactly the same behavior than he does on a 1.8.5 Zenwalk > > I have the impression that OP got the victim of a "leftover" in his irb > > session. > > Perhaps the OP was, but I think that Robert's statements are still correct: Sure was, sure was, I am just with you right now, thanks to your explanation Rick. I mean Robert's as emphasized by Rick, just gotta reread the whole thread, now that I know what you are talking about :( Thx a lot to both of you. Robert -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw