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).
This commit is contained in:
parent
fb4cf204a6
commit
fa0279d947
Notes:
git
2021-07-29 00:57:08 +09:00
2
array.c
2
array.c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user