# Why is "rb\_define\_method(rb\_cSymbol, ..." needed?

**URL:** <https://www.ruby-forum.com/t/why-is-rb-define-method-rb-csymbol-needed/164672>\
**Category:** Ruby\
**Created:** [April 3, 2009, 8:49pm UTC](https://www.ruby-forum.com/t/why-is-rb-define-method-rb-csymbol-needed/164672 "2009-04-03T20:49:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [April 3, 2009, 8:49pm UTC](https://www.ruby-forum.com/t/why-is-rb-define-method-rb-csymbol-needed/164672/1 "2009-04-03T20:49:24Z")

</div>

Hi, I’m inspecting the C code of String#capitalize method and have found  
the  
following:

rb\_define\_method(rb\_cSymbol, “capitalize”, sym\_capitalize, 0);

What is it need for? I didn’t add such line to my custom C method and  
works  
ok.

---

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [April 3, 2009, 8:51pm UTC](https://www.ruby-forum.com/t/why-is-rb-define-method-rb-csymbol-needed/164672/2 "2009-04-03T20:51:46Z")

</div>

El Viernes 03 Abril 2009, IÃ±aki Baz C. escribiÃ³:

> Hi, I’m inspecting the C code of String#capitalize method and have found  
> the following:
> 
> rb\_define\_method(rb\_cSymbol, “capitalize”, sym\_capitalize, 0);
> 
> What is it need for? I didn’t add such line to my custom C method and works  
> ok.

Ops, understood!

It added “capitalize” method also to Symbols 🙂
