From a4b28f14cc9983e90ee5273d83d03d0f2eea7de7 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 9 Feb 2026 21:16:20 -0500 Subject: [DOC] Fix hash style for Array#flatten! --- array.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/array.c b/array.c index ac7b73c0dd..0eb4c45370 100644 --- a/array.c +++ b/array.c @@ -6747,16 +6747,16 @@ flatten(VALUE ary, int level) * With non-negative integer argument +depth+, flattens recursively through +depth+ levels: * * a = [ 0, [ 1, [2, 3], 4 ], 5, {foo: 0}, Set.new([6, 7]) ] - * a # => [0, [1, [2, 3], 4], 5, {:foo=>0}, #] - * a.dup.flatten!(1) # => [0, 1, [2, 3], 4, 5, {:foo=>0}, #] - * a.dup.flatten!(1.1) # => [0, 1, [2, 3], 4, 5, {:foo=>0}, #] - * a.dup.flatten!(2) # => [0, 1, 2, 3, 4, 5, {:foo=>0}, #] - * a.dup.flatten!(3) # => [0, 1, 2, 3, 4, 5, {:foo=>0}, #] + * a # => [0, [1, [2, 3], 4], 5, {foo: 0}, #] + * a.dup.flatten!(1) # => [0, 1, [2, 3], 4, 5, {foo: 0}, #] + * a.dup.flatten!(1.1) # => [0, 1, [2, 3], 4, 5, {foo: 0}, #] + * a.dup.flatten!(2) # => [0, 1, 2, 3, 4, 5, {foo: 0}, #] + * a.dup.flatten!(3) # => [0, 1, 2, 3, 4, 5, {foo: 0}, #] * * With +nil+ or negative argument +depth+, flattens all levels: * - * a.dup.flatten! # => [0, 1, 2, 3, 4, 5, {:foo=>0}, #] - * a.dup.flatten!(-1) # => [0, 1, 2, 3, 4, 5, {:foo=>0}, #] + * a.dup.flatten! # => [0, 1, 2, 3, 4, 5, {foo: 0}, #] + * a.dup.flatten!(-1) # => [0, 1, 2, 3, 4, 5, {foo: 0}, #] * * Related: Array#flatten; * see also {Methods for Assigning}[rdoc-ref:Array@Methods+for+Assigning]. -- cgit v1.2.3