mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Move Array#select to Ruby
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
This commit is contained in:
parent
d57d85548f
commit
c9a5a71695
Notes:
git
2024-11-13 20:27:44 +00:00
2 changed files with 31 additions and 0 deletions
6
array.c
6
array.c
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue