[DOC] Tweaks for Array#dig
This commit is contained in:
parent
c7e1862116
commit
309362d6c5
Notes:
git
2024-09-11 12:47:28 +00:00
7
array.c
7
array.c
@ -8031,9 +8031,9 @@ rb_ary_one_p(int argc, VALUE *argv, VALUE ary)
|
|||||||
* call-seq:
|
* call-seq:
|
||||||
* array.dig(index, *identifiers) -> object
|
* array.dig(index, *identifiers) -> object
|
||||||
*
|
*
|
||||||
* Finds and returns the object in nested objects
|
* Finds and returns the object in nested object
|
||||||
* that is specified by +index+ and +identifiers+.
|
* specified by +index+ and +identifiers+;
|
||||||
* The nested objects may be instances of various classes.
|
* the nested objects may be instances of various classes.
|
||||||
* See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
|
* See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
@ -8044,6 +8044,7 @@ rb_ary_one_p(int argc, VALUE *argv, VALUE ary)
|
|||||||
* a.dig(1, 2, 0) # => :bat
|
* a.dig(1, 2, 0) # => :bat
|
||||||
* a.dig(1, 2, 3) # => nil
|
* a.dig(1, 2, 3) # => nil
|
||||||
*
|
*
|
||||||
|
* Related: see {Methods for Fetching}[rdoc-ref:Array@Methods+for+Fetching].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user