Update Ruby 3 images to 3.0.3

This commit is contained in:
Matthias Käppler 2021-11-25 08:21:32 +00:00 committed by Balasankar 'Balu' C
parent e1bfec0c95
commit 88d8ef2879
5 changed files with 3 additions and 3 deletions

View file

@ -0,0 +1,22 @@
commit fa0279d947c3962c3f8c32852278d3ebb964cb19
Author: Koichi Sasada <ko1@atdot.net>
Date: Wed Jul 28 13:40:30 2021 +0900
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).
diff --git a/array.c b/array.c
index 3cb57a0872..36f712bcac 100644
--- a/array.c
+++ b/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);