ruby-changes:14388
From: knu <ko1@a...>
Date: Fri, 1 Jan 2010 00:14:16 +0900 (JST)
Subject: [ruby-changes:14388] Ruby:r26218 (ruby_1_8): * object.c, intern.h: Export rb_sym_to_s.
knu 2010-01-01 00:14:00 +0900 (Fri, 01 Jan 2010) New Revision: 26218 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26218 Log: * object.c, intern.h: Export rb_sym_to_s. Modified files: branches/ruby_1_8/intern.h branches/ruby_1_8/object.c Index: ruby_1_8/intern.h =================================================================== --- ruby_1_8/intern.h (revision 26217) +++ ruby_1_8/intern.h (revision 26218) @@ -334,6 +334,7 @@ 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*)); Index: ruby_1_8/object.c =================================================================== --- ruby_1_8/object.c (revision 26217) +++ ruby_1_8/object.c (revision 26218) @@ -1197,8 +1197,8 @@ */ -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 @@ 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/