Skip to content

Commit 2078ba1

Browse files
BurdetteLamarpeterzhu2118
authored andcommitted
[DOC] Tweaks for Array#transpose
1 parent 979e447 commit 2078ba1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

array.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4494,14 +4494,17 @@ rb_ary_zip(int argc, VALUE *argv, VALUE ary)
44944494

44954495
/*
44964496
* call-seq:
4497-
* array.transpose -> new_array
4497+
* transpose -> new_array
44984498
*
4499-
* Transposes the rows and columns in an +Array+ of Arrays;
4500-
* the nested Arrays must all be the same size:
4499+
* Returns a new array that is +self+
4500+
* as a {transposed matrix}[https://en.wikipedia.org/wiki/Transpose]:
45014501
*
45024502
* a = [[:a0, :a1], [:b0, :b1], [:c0, :c1]]
45034503
* a.transpose # => [[:a0, :b0, :c0], [:a1, :b1, :c1]]
45044504
*
4505+
* The elements of +self+ must all be the same size.
4506+
*
4507+
* Related: see {Methods for Converting}[rdoc-ref:Array@Methods+for+Converting].
45054508
*/
45064509

45074510
static VALUE

0 commit comments

Comments
 (0)