# A question about metaclass

**URL:** <https://www.ruby-forum.com/t/a-question-about-metaclass/48745>\
**Category:** Ruby\
**Created:** [November 24, 2005, 2:31am UTC](https://www.ruby-forum.com/t/a-question-about-metaclass/48745 "2005-11-24T02:31:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam.s.kong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ac91a4/32.png) [@sam.s.kong](https://www.ruby-forum.com/u/sam.s.kong)\
**Post date:** [November 24, 2005, 2:31am UTC](https://www.ruby-forum.com/t/a-question-about-metaclass/48745/1 "2005-11-24T02:31:35Z")

</div>

Hi!

Some code first…

* * *

class C  
end

## obj = C.new #\<-- Question here.

My question is where the C.new method is.  
The class Class or C’s singleton class?

According to PickAxe2, it seems that C.new is in Class.  
However, according to Little Ruby book, it seems that C.new is in C’s  
metaclass.

Which is right and how can we confirm that?

TIA.

Sam

---

<div class="post-metadata">

**Author:** ![sam.s.kong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ac91a4/32.png) [@sam.s.kong](https://www.ruby-forum.com/u/sam.s.kong)\
**Post date:** [November 24, 2005, 2:51am UTC](https://www.ruby-forum.com/t/a-question-about-metaclass/48745/2 "2005-11-24T02:51:43Z")

</div>

Sam K. wrote:

> My question is where the C.new method is.  
> The class Class or C’s singleton class?
> 
> According to PickAxe2, it seems that C.new is in Class.  
> However, according to Little Ruby book, it seems that C.new is in C’s  
> metaclass.

What is “Little Ruby book”?

James

---

<div class="post-metadata">

**Author:** ![sam.s.kong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ac91a4/32.png) [@sam.s.kong](https://www.ruby-forum.com/u/sam.s.kong)\
**Post date:** [November 24, 2005, 9:25am UTC](https://www.ruby-forum.com/t/a-question-about-metaclass/48745/3 "2005-11-24T09:25:53Z")

</div>

james\_b wrote:

> Sam K. wrote:
> 
> > My question is where the C.new method is.  
> > The class Class or C’s singleton class?
> > 
> > According to PickAxe2, it seems that C.new is in Class.  
> > However, according to Little Ruby book, it seems that C.new is in C’s  
> > metaclass.
> 
> What is “Little Ruby book”?
> 
> James

[http://www.visibleworkings.com/little-ruby/](http://www.visibleworkings.com/little-ruby/) ,“A Little Ruby, A Lot of  
Objects”, book fragment by Brian M., a real gem!

Regards, Bernhard
