summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorMasataka Pocke Kuwabara <kuwabara@pocke.me>2021-05-08 17:04:30 +0900
committerMarc-André Lafortune <github@marc-andre.ca>2021-05-08 09:41:08 -0400
commite3e55967826668dcf6f04c550cab5ef8df71fdb7 (patch)
treed1137972c3f727d9486b205be5ce2f21399c2c30 /array.c
parentc7601fb9ed41a6d63829b1f8b637f319e3bea462 (diff)
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]`.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4475
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
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 <tt><=></tt>:
* [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.
*