From: ts Date: 2005-11-19T02:36:25+09:00 Subject: Re: irb and ruby >>>>> "D" == David A Black writes: D> I'm not sure why irb doesn't make top-level methods private, but I D> think that's the only difference (in this area) between irb and Ruby. You can change its context moulon% irb --context-mode 0 irb(main):001:0> def aa() 1+1; end => nil irb(main):002:0> aa => 2 irb(main):003:0> self.aa NoMethodError: private method `aa' called for main:Object from (irb):3 from /usr/lib/ruby/1.8/irb/workspace.rb:27 from :0 irb(main):004:0> moulon% Guy Decoux