diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-29 08:10:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-29 08:10:10 +0000 |
commit | 08e914f33104b985e7c6bc16d51378cd39c76474 (patch) | |
tree | 07e068a361a493b1dde9ea7b7f2ba95209e9db55 /struct.c | |
parent | 2a6fb9690a698134659cd905d6c9a29dfb0080d6 (diff) |
* struct.c (Init_Struct): made #to_s an alias to #inspect to
reduce the result of recursive struct. a patch from ujihisa at
[ruby-dev:38554].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -900,8 +900,8 @@ Init_Struct(void) rb_define_method(rb_cStruct, "eql?", rb_struct_eql, 1); rb_define_method(rb_cStruct, "hash", rb_struct_hash, 0); - rb_define_method(rb_cStruct, "to_s", rb_struct_inspect, 0); rb_define_method(rb_cStruct, "inspect", rb_struct_inspect, 0); + rb_define_alias(rb_cStruct, "to_s", "inspect"); rb_define_method(rb_cStruct, "to_a", rb_struct_to_a, 0); rb_define_method(rb_cStruct, "values", rb_struct_to_a, 0); rb_define_method(rb_cStruct, "size", rb_struct_size, 0); |