From: cypher.dp@... Date: 2007-06-22T10:23:19+09:00 Subject: Re: Reflecting on methods Yeah, that's it !!! Guess I was blind... Thanks a lot ! Dominik 2007/6/22, rking@panoptic.com : > > Question: Why is "prot_meth" not listed in protected_methods ? And "priv_meth" in private_methods ? > > In general: Which of these *_methods gives which result ? > > You are calling .protected_methods and .private_methods on the Test > class object, not a Test instance object. > > This code: > %w(protected_methods private_methods).each {|m| puts m + " = [" + > (Test.new.send(m) - Object.new.send(m)).join(',') + "]" } > gives: > protected_methods = [prot_meth] > private_methods = [priv_meth] > > >