[DOC] Related for Array#clear

This commit is contained in:
BurdetteLamar 2024-09-01 16:18:33 +01:00 committed by Peter Zhu
parent bd9fa014e3
commit ec3851e6b1
Notes: git 2024-09-10 18:03:31 +00:00

View File

@ -4663,6 +4663,7 @@ rb_ary_replace(VALUE copy, VALUE orig)
* a = [:foo, 'bar', 2]
* a.clear # => []
*
* Related: see {Methods for Deleting}[rdoc-ref:Array@Methods+for+Deleting].
*/
VALUE
@ -8648,6 +8649,7 @@ rb_ary_deconstruct(VALUE ary)
* - #delete: Removes elements equal to a given object.
* - #delete_at: Removes the element at a given offset.
* - #delete_if: Removes elements specified by a given block.
* - #clear: Removes all elements.
* - #keep_if: Removes elements not specified by a given block.
* - #reject!: Removes elements specified by a given block.
* - #select! (aliased as #filter!): Removes elements not specified by a given block.