зеркало из https://github.com/github/ruby.git
Improve documentation of Array.try_convert
* Mostly to try the new git repository.
This commit is contained in:
Родитель
429fdf3de2
Коммит
87d2a2df1b
4
array.c
4
array.c
|
@ -879,8 +879,8 @@ rb_check_to_array(VALUE ary)
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* Array.try_convert(obj) -> array or nil
|
* Array.try_convert(obj) -> array or nil
|
||||||
*
|
*
|
||||||
* Tries to convert +obj+ into an array, using +to_ary+ method. Returns the
|
* Tries to convert +obj+ into an array, using the +to_ary+ method. Returns
|
||||||
* converted array or +nil+ if +obj+ cannot be converted for any reason.
|
* the converted array or +nil+ if +obj+ cannot be converted.
|
||||||
* This method can be used to check if an argument is an array.
|
* This method can be used to check if an argument is an array.
|
||||||
*
|
*
|
||||||
* Array.try_convert([1]) #=> [1]
|
* Array.try_convert([1]) #=> [1]
|
||||||
|
|
Загрузка…
Ссылка в новой задаче