[DOC] More xrefs for array creation

This commit is contained in:
BurdetteLamar 2024-08-28 17:15:35 +01:00 committed by Peter Zhu
parent 8f95e2abfe
commit a7cec438a1
Notes: git 2024-08-28 19:05:23 +00:00

View File

@ -1038,6 +1038,8 @@ rb_to_array(VALUE ary)
* if not, raises TypeError.
*
* Otherwise returns +nil+.
*
* Related: see {Methods for Creating an Array}[rdoc-ref:Array@Methods+for+Creating+an+Array].
*/
static VALUE
@ -1117,6 +1119,8 @@ rb_ary_s_new(int argc, VALUE *argv, VALUE klass)
* Raises TypeError if the first argument is not either an array
* or an {integer-convertible object}[rdoc-ref:implicit_conversion.rdoc@Integer-Convertible+Objects]).
* Raises ArgumentError if the first argument is a negative integer.
*
* Related: see {Methods for Creating an Array}[rdoc-ref:Array@Methods+for+Creating+an+Array].
*/
static VALUE
@ -1180,6 +1184,7 @@ rb_ary_initialize(int argc, VALUE *argv, VALUE ary)
* Array[] # => []
* Array.[](1, 'a', /^A/) # => [1, "a", /^A/]
*
* Related: see {Methods for Creating an Array}[rdoc-ref:Array@Methods+for+Creating+an+Array].
*/
static VALUE
@ -8542,6 +8547,8 @@ rb_ary_deconstruct(VALUE ary)
* - ::new: Returns a new array.
* - ::try_convert: Returns a new array created from a given object.
*
* See also {Creating Arrays}[rdoc-ref:Array@Creating+Arrays].
*
* === Methods for Querying
*
* - #length, #size: Returns the count of elements.