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.
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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs