diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | encoding.c | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Tue Oct 16 13:49:41 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * encoding.c (enc_to_s): rename function. + Tue Oct 16 13:25:46 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (rb_str_new4): should copy encoding. a patch from NARUSE, diff --git a/encoding.c b/encoding.c index dd01fba94a..93c3eca48c 100644 --- a/encoding.c +++ b/encoding.c @@ -461,7 +461,7 @@ rb_enc_tolower(int c, rb_encoding *enc) } static VALUE -enc_inspect(VALUE self) +enc_to_s(VALUE self) { return rb_sprintf("<%s:%s>", rb_obj_classname(self), rb_enc_name(enc_get_encoding(self))); @@ -518,8 +518,8 @@ Init_Encoding(void) { rb_cEncoding = rb_define_class("Encoding", rb_cObject); rb_undef_alloc_func(rb_cEncoding); - rb_define_method(rb_cEncoding, "to_s", enc_inspect, 0); - rb_define_method(rb_cEncoding, "inspect", enc_inspect, 0); + rb_define_method(rb_cEncoding, "to_s", enc_to_s, 0); + rb_define_method(rb_cEncoding, "inspect", enc_to_s, 0); rb_define_method(rb_cEncoding, "name", enc_name, 0); rb_define_singleton_method(rb_cEncoding, "list", enc_list, 0); rb_define_singleton_method(rb_cEncoding, "find", enc_find, 1); |