mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[DOC] Tweaks for Array#reverse!
This commit is contained in:
parent
377d022853
commit
1962be267c
Notes:
git
2024-10-09 18:02:55 +00:00
1 changed files with 7 additions and 4 deletions
11
array.c
11
array.c
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue