Skip to content

Commit

Permalink
should not share same def for specialized method
Browse files Browse the repository at this point in the history
Because the key of redefine table is `def`, `def` should be
unique for each optimized method (`alias` is not allowed).
  • Loading branch information
ko1 committed Jul 28, 2021
1 parent fb4cf20 commit fa0279d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion array.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fa0279d

Please sign in to comment.