aboutsummaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
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);