* encoding.c (Init_Encoding): define #to_s to show encoding name

in to_s representation as well as #inspect.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-10-15 16:28:18 +00:00
parent 118625a3b3
commit ff3859899d
3 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Tue Oct 16 01:25:40 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* encoding.c (Init_Encoding): define #to_s to show encoding name
in to_s representation as well as #inspect.
Mon Oct 15 13:24:08 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* numeric.c (flo_round): should be number but not rounding factor.

View File

@ -518,6 +518,7 @@ 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, "name", enc_name, 0);
rb_define_singleton_method(rb_cEncoding, "list", enc_list, 0);

View File

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2007-10-15"
#define RUBY_RELEASE_DATE "2007-10-16"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20071015
#define RUBY_RELEASE_CODE 20071016
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 10
#define RUBY_RELEASE_DAY 15
#define RUBY_RELEASE_DAY 16
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];