aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--struct.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 537f911202..57b059aeaa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,13 @@
+Fri May 29 17:10:08 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * struct.c (Init_Struct): made #to_s an alias to #inspect to
+ reduce the result of recursive struct. a patch from ujihisa a
+ [ruby-dev:38554].
+
Fri May 29 17:08:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* hash.c (Init_Hash): made #to_s an alias to #inspect to reduce
- the result of recursive array. a patch from ujihisa a
+ the result of recursive hash. a patch from ujihisa a
[ruby-core:23601]. [ruby-dev:38555]
Fri May 29 09:30:00 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
diff --git a/struct.c b/struct.c
index 718add389f..25e91a2abb 100644
--- a/struct.c
+++ b/struct.c
@@ -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);