From 2078ba1984a684443257635cef22f257c3bf239e Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Tue, 22 Oct 2024 14:36:02 -0500 Subject: [PATCH] [DOC] Tweaks for Array#transpose --- array.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/array.c b/array.c index 1f24480f4d..cf562ed4f6 100644 --- a/array.c +++ b/array.c @@ -4494,14 +4494,17 @@ rb_ary_zip(int argc, VALUE *argv, VALUE ary) /* * call-seq: - * array.transpose -> new_array + * transpose -> new_array * - * Transposes the rows and columns in an +Array+ of Arrays; - * the nested Arrays must all be the same size: + * Returns a new array that is +self+ + * as a {transposed matrix}[https://en.wikipedia.org/wiki/Transpose]: * * a = [[:a0, :a1], [:b0, :b1], [:c0, :c1]] * a.transpose # => [[:a0, :b0, :c0], [:a1, :b1, :c1]] * + * The elements of +self+ must all be the same size. + * + * Related: see {Methods for Converting}[rdoc-ref:Array@Methods+for+Converting]. */ static VALUE