summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-31 15:14:00 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-31 15:14:00 +0000
commit6476c42337e13642e72f612a70d7da85816adec4 (patch)
tree8c72be2600cce9458a021dcd7c3ad5b26a93e975
parent3e5fd3adc11edbe85cf42741de99f9b3a27be5af (diff)
* 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
-rw-r--r--intern.h1
-rw-r--r--object.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/intern.h b/intern.h
index d9b8ac0016..22d58fe125 100644
--- a/intern.h
+++ b/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*));
diff --git a/object.c b/object.c
index 9f2a8498f3..b34a57195a 100644
--- a/object.c
+++ b/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);