From: Jonathan Leighton Date: 2006-01-02T00:49:37+09:00 Subject: Re: initialize On Sun, 2006-01-01 at 23:06 +0900, ts wrote: > >>>>> "J" == Jonathan Leighton writes: > > J> Should initialize() be public, private or protected, and why? > > moulon% cat b.rb > #!/usr/bin/ruby > class A > protected > def initialize > end > end > > p A.private_instance_methods(false) > p A.protected_instance_methods(false) > moulon% > > moulon% ./b.rb > ["initialize"] > [] > moulon% Thanks for the reply. Forgive me, but I don't understand what the point is in your example? Or why initialize is returned by private_instance_methods() but not protected_instance_methods()? Could you elaborate a bit please? Thanks -- Jonathan Leighton http://turnipspatch.com/ | http://jonathanleighton.com/ | http://digital-proof.org/