diff options
author | Masataka Pocke Kuwabara <kuwabara@pocke.me> | 2021-05-08 17:04:30 +0900 |
---|---|---|
committer | Marc-André Lafortune <github@marc-andre.ca> | 2021-05-08 09:41:08 -0400 |
commit | e3e55967826668dcf6f04c550cab5ef8df71fdb7 (patch) | |
tree | d1137972c3f727d9486b205be5ce2f21399c2c30 /array.c | |
parent | c7601fb9ed41a6d63829b1f8b637f319e3bea462 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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. * |