mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* object.c, intern.h: Export rb_sym_to_s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3e5fd3adc1
commit
6476c42337
2 changed files with 5 additions and 4 deletions
1
intern.h
1
intern.h
|
@ -334,6 +334,7 @@ VALUE rb_obj_untaint _((VALUE));
|
|||
VALUE rb_obj_freeze _((VALUE));
|
||||
VALUE rb_obj_id _((VALUE));
|
||||
VALUE rb_obj_class _((VALUE));
|
||||
VALUE rb_sym_to_s _((VALUE));
|
||||
VALUE rb_class_real _((VALUE));
|
||||
VALUE rb_class_inherited_p _((VALUE, VALUE));
|
||||
VALUE rb_convert_type _((VALUE,int,const char*,const char*));
|
||||
|
|
8
object.c
8
object.c
|
@ -1197,8 +1197,8 @@ sym_inspect(sym)
|
|||
*/
|
||||
|
||||
|
||||
static VALUE
|
||||
sym_to_s(sym)
|
||||
VALUE
|
||||
rb_sym_to_s(sym)
|
||||
VALUE sym;
|
||||
{
|
||||
return rb_str_new2(rb_id2name(SYM2ID(sym)));
|
||||
|
@ -2817,8 +2817,8 @@ Init_Object()
|
|||
rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0);
|
||||
rb_define_method(rb_cSymbol, "to_int", sym_to_int, 0);
|
||||
rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0);
|
||||
rb_define_method(rb_cSymbol, "to_s", sym_to_s, 0);
|
||||
rb_define_method(rb_cSymbol, "id2name", sym_to_s, 0);
|
||||
rb_define_method(rb_cSymbol, "to_s", rb_sym_to_s, 0);
|
||||
rb_define_method(rb_cSymbol, "id2name", rb_sym_to_s, 0);
|
||||
rb_define_method(rb_cSymbol, "to_sym", sym_to_sym, 0);
|
||||
rb_define_method(rb_cSymbol, "to_proc", sym_to_proc, 0);
|
||||
rb_define_method(rb_cSymbol, "===", rb_obj_equal, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue