mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Define rb_to_array which converts with to_a
This commit is contained in:
parent
1a3b68e7c1
commit
e8b210542b
2 changed files with 7 additions and 0 deletions
6
array.c
6
array.c
|
@ -996,6 +996,12 @@ rb_check_to_array(VALUE ary)
|
|||
return rb_check_convert_type_with_id(ary, T_ARRAY, "Array", idTo_a);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_to_array(VALUE ary)
|
||||
{
|
||||
return rb_convert_type_with_id(ary, T_ARRAY, "Array", idTo_a);
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* Array.try_convert(object) -> object, new_array, or nil
|
||||
|
|
|
@ -29,6 +29,7 @@ VALUE rb_ary_tmp_new_fill(long capa);
|
|||
VALUE rb_ary_at(VALUE, VALUE);
|
||||
size_t rb_ary_memsize(VALUE);
|
||||
VALUE rb_to_array_type(VALUE obj);
|
||||
VALUE rb_to_array(VALUE obj);
|
||||
void rb_ary_cancel_sharing(VALUE ary);
|
||||
|
||||
static inline VALUE rb_ary_entry_internal(VALUE ary, long offset);
|
||||
|
|
Loading…
Reference in a new issue