diff options
author | Koichi Sasada <[email protected]> | 2021-07-28 13:40:30 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2021-07-29 00:56:48 +0900 |
commit | fa0279d947c3962c3f8c32852278d3ebb964cb19 (patch) | |
tree | 5095684bf9af2bb0b61f0c00443433a80193a2e4 /array.c | |
parent | fb4cf204a662a8cd9dafef6f31f2bd0db9129abe (diff) |
should not share same `def` for specialized method
Because the key of redefine table is `def`, `def` should be
unique for each optimized method (`alias` is not allowed).
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4493
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -8384,7 +8384,7 @@ Init_Array(void) rb_define_method(rb_cArray, "each_index", rb_ary_each_index, 0); rb_define_method(rb_cArray, "reverse_each", rb_ary_reverse_each, 0); rb_define_method(rb_cArray, "length", rb_ary_length, 0); - rb_define_alias(rb_cArray, "size", "length"); + rb_define_method(rb_cArray, "size", rb_ary_length, 0); rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0); rb_define_method(rb_cArray, "find_index", rb_ary_index, -1); rb_define_method(rb_cArray, "index", rb_ary_index, -1); |