From: Robert Dober Date: 2007-07-29T05:33:33+09:00 Subject: Re: Quarks On 7/28/07, Robert Dober wrote: > On 7/28/07, Trans wrote: > > Why? > > > > class X; end > > > > X.methods(false) > > => [] > > > > But... > > > > X.public_methods(false) > > => ["allocate", "superclass", "new"] > > > > X.private_methods(false) > > => ["initialize", "initialize_copy", "inherited"] > > > > T. > > > > > > > > irb(main):001:0> class X;end > => nil > irb(main):002:0> x=X.new > => # > irb(main):003:0> x.methods false > => [] > irb(main):004:0> x.public_methods false > => [] > irb(main):005:0> x.private_methods false > => [] > > seems quite ok. The following is the *uppercase* X, sorry very bad naming of my part :(. > The result of > X.public_methods false and > X.private_methods false > seems correct > but why the hack ;) is > X.methods false > empty???? > > Robert > -- > [...] as simple as possible, but no simpler. > -- Attributed to Albert Einstein > -- [...] as simple as possible, but no simpler. -- Attributed to Albert Einstein