From e3e55967826668dcf6f04c550cab5ef8df71fdb7 Mon Sep 17 00:00:00 2001 From: Masataka Pocke Kuwabara Date: Sat, 8 May 2021 17:04:30 +0900 Subject: [PATCH] Fix example code in Array#max doc `[0, 1, 2, 3].max(6)` actually returns `[3, 2, 1, 0]`, but the doc said it returns `[3, 2, 1]`. --- array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/array.c b/array.c index 50e2418462..881270b915 100644 --- a/array.c +++ b/array.c @@ -5737,7 +5737,7 @@ ary_max_opt_string(VALUE ary, long i, VALUE vmax) * With an argument \Integer +n+ and no block, returns a new \Array with at most +n+ elements, * in descending order per method <=>: * [0, 1, 2, 3].max(3) # => [3, 2, 1] - * [0, 1, 2, 3].max(6) # => [3, 2, 1] + * [0, 1, 2, 3].max(6) # => [3, 2, 1, 0] * * When a block is given, the block must return an \Integer. *