Move Array#select to Ruby

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
This commit is contained in:
Takashi Kokubun 2024-11-12 20:39:32 -08:00
parent d57d85548f
commit c9a5a71695
Notes: git 2024-11-13 20:27:44 +00:00
2 changed files with 31 additions and 0 deletions

View file

@ -6866,6 +6866,12 @@ ary_sample(rb_execution_context_t *ec, VALUE ary, VALUE randgen, VALUE nv, VALUE
return result;
}
static VALUE
ary_sized_alloc(rb_execution_context_t *ec, VALUE self)
{
return rb_ary_new2(RARRAY_LEN(self));
}
static VALUE
ary_sample0(rb_execution_context_t *ec, VALUE ary)
{