summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index ee22f202e44..df416877c3a 100644
--- a/string.c
+++ b/string.c
@@ -2603,7 +2603,7 @@ Init_String()
rb_define_method(rb_cString, "[]", rb_str_aref_method, -1);
rb_define_method(rb_cString, "[]=", rb_str_aset_method, -1);
rb_define_method(rb_cString, "length", rb_str_length, 0);
- rb_define_alias(rb_cString, "size", "length");
+ rb_define_method(rb_cString, "size", rb_str_length, 0);
rb_define_method(rb_cString, "empty?", rb_str_empty, 0);
rb_define_method(rb_cString, "=~", rb_str_match, 1);
rb_define_method(rb_cString, "~", rb_str_match2, 0);