Skip to content

Commit

Permalink
[DOC] Tweaks for Array#reverse!
Browse files Browse the repository at this point in the history
  • Loading branch information
BurdetteLamar authored and peterzhu2118 committed Oct 9, 2024
1 parent 377d022 commit 1962be2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions array.c
Original file line number Diff line number Diff line change
Expand Up @@ -3123,13 +3123,16 @@ rb_ary_reverse(VALUE ary)

/*
* call-seq:
* array.reverse! -> self
* reverse! -> self
*
* Reverses +self+ in place:
* Reverses the order of the elements of +self+;
* returns +self+:
*
* a = ['foo', 'bar', 'two']
* a.reverse! # => ["two", "bar", "foo"]
* a = [0, 1, 2]
* a.reverse! # => [2, 1, 0]
* a # => [2, 1, 0]
*
* Related: see {Methods for Assigning}[rdoc-ref:Array@Methods+for+Assigning].
*/

static VALUE
Expand Down

0 comments on commit 1962be2

Please sign in to comment.