Skip to content

Commit 752c88b

Browse files
committed
[DOC] Fix hash style for Array#flatten
1 parent a4b28f1 commit 752c88b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

array.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6803,17 +6803,17 @@ rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary)
68036803
* With non-negative integer argument +depth+, flattens recursively through +depth+ levels:
68046804
*
68056805
* a = [ 0, [ 1, [2, 3], 4 ], 5, {foo: 0}, Set.new([6, 7]) ]
6806-
* a # => [0, [1, [2, 3], 4], 5, {:foo=>0}, #<Set: {6, 7}>]
6807-
* a.flatten(0) # => [0, [1, [2, 3], 4], 5, {:foo=>0}, #<Set: {6, 7}>]
6808-
* a.flatten(1 ) # => [0, 1, [2, 3], 4, 5, {:foo=>0}, #<Set: {6, 7}>]
6809-
* a.flatten(1.1) # => [0, 1, [2, 3], 4, 5, {:foo=>0}, #<Set: {6, 7}>]
6810-
* a.flatten(2) # => [0, 1, 2, 3, 4, 5, {:foo=>0}, #<Set: {6, 7}>]
6811-
* a.flatten(3) # => [0, 1, 2, 3, 4, 5, {:foo=>0}, #<Set: {6, 7}>]
6806+
* a # => [0, [1, [2, 3], 4], 5, {foo: 0}, #<Set: {6, 7}>]
6807+
* a.flatten(0) # => [0, [1, [2, 3], 4], 5, {foo: 0}, #<Set: {6, 7}>]
6808+
* a.flatten(1 ) # => [0, 1, [2, 3], 4, 5, {foo: 0}, #<Set: {6, 7}>]
6809+
* a.flatten(1.1) # => [0, 1, [2, 3], 4, 5, {foo: 0}, #<Set: {6, 7}>]
6810+
* a.flatten(2) # => [0, 1, 2, 3, 4, 5, {foo: 0}, #<Set: {6, 7}>]
6811+
* a.flatten(3) # => [0, 1, 2, 3, 4, 5, {foo: 0}, #<Set: {6, 7}>]
68126812
*
68136813
* With +nil+ or negative +depth+, flattens all levels.
68146814
*
6815-
* a.flatten # => [0, 1, 2, 3, 4, 5, {:foo=>0}, #<Set: {6, 7}>]
6816-
* a.flatten(-1) # => [0, 1, 2, 3, 4, 5, {:foo=>0}, #<Set: {6, 7}>]
6815+
* a.flatten # => [0, 1, 2, 3, 4, 5, {foo: 0}, #<Set: {6, 7}>]
6816+
* a.flatten(-1) # => [0, 1, 2, 3, 4, 5, {foo: 0}, #<Set: {6, 7}>]
68176817
*
68186818
* Related: Array#flatten!;
68196819
* see also {Methods for Converting}[rdoc-ref:Array@Methods+for+Converting].

0 commit comments

Comments
 (0)