# Reflection?

**URL:** <https://rubytalk.org/t/reflection/3281>\
**Category:** ruby-talk\
**Created:** [3 December 2002 16:19 UTC](https://rubytalk.org/t/reflection/3281 "2002-12-03T16:19:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shannon\_Fang](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Shannon\_Fang](https://rubytalk.org/u/Shannon_Fang)\
**Post date:** [3 December 2002 16:19 UTC](https://rubytalk.org/t/reflection/3281/1 "2002-12-03T16:19:07Z")

</div>

Hi

I’m sorry I found out the reason is that the method is not a class method.  
Sorry for being ignorant.

Shannon

> **···**
>
> > From: “Shannon Fang” [xrfang@hotmail.com](mailto:xrfang@hotmail.com)  
> > Reply-To: [ruby-talk@ruby-lang.org](mailto:ruby-talk@ruby-lang.org)  
> > To: [ruby-talk@ruby-lang.org](mailto:ruby-talk@ruby-lang.org) (ruby-talk ML)  
> > Subject: Reflection?  
> > Date: Wed, 4 Dec 2002 01:16:26 +0900
> > 
> > Hi,
> > 
> > Pls have a look at the following code:
> > 
> > class A  
> > def mymethod  
> > p “I am A!”  
> > end  
> > end  
> > p A.ancestors  
> > p A.respond\_to?(“mymethod”)  
> > p A.methods.sort
> > 
> > It will give out all methods in the ancestor classes, but no A! and  
> > A.respond\_to?(“mymethod”) will return false…
> > 
> > Tks.  
> > Shannon
> > 
> > * * *
> > 
> > STOP MORE SPAM with the new MSN 8 and get 2 months FREE\*  
> > [http://join.msn.com/?page=features/junkmail](http://join.msn.com/?page=features/junkmail)
> 
> * * *
> 
> Add photos to your messages with MSN 8. Get 2 months FREE\*.  
> [http://join.msn.com/?page=features/featuredemail](http://join.msn.com/?page=features/featuredemail)

---

<div class="post-metadata">

**Author:** ![HAL\_9000](https://avatars.discourse-cdn.com/v4/letter/h/90ced4/32.png) [@HAL\_9000](https://rubytalk.org/u/HAL_9000)\
**Post date:** [4 December 2002 00:01 UTC](https://rubytalk.org/t/reflection/3281/2 "2002-12-04T00:01:35Z")

</div>

🙂 Don’t be sorry for ignorance, it is better  
than rudeness… and we are all ignorant anyway,  
just on different subjects.

H

> **···**
>
> ----- Original Message -----  
> From: “Shannon Fang” [xrfang@hotmail.com](mailto:xrfang@hotmail.com)  
> To: “ruby-talk ML” [ruby-talk@ruby-lang.org](mailto:ruby-talk@ruby-lang.org)  
> Sent: Tuesday, December 03, 2002 10:19 AM  
> Subject: Re: Reflection?
> 
> > Hi
> > 
> > I’m sorry I found out the reason is that the method is not a class method.  
> > Sorry for being ignorant.
