Skip to content

Commit 5eb17ea

Browse files
committed
[DOC] Fix hash style in Hash#flatten
1 parent d561609 commit 5eb17ea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

hash.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4492,21 +4492,21 @@ flatten_i(VALUE key, VALUE val, VALUE ary)
44924492
* Examples; note that entry <tt>foo: {bar: 1, baz: 2}</tt> is never flattened.
44934493
*
44944494
* h = {foo: {bar: 1, baz: 2}, bat: [:bam, [:bap, [:bah]]]}
4495-
* h.flatten(1) # => [:foo, {:bar=>1, :baz=>2}, :bat, [:bam, [:bap, [:bah]]]]
4496-
* h.flatten(2) # => [:foo, {:bar=>1, :baz=>2}, :bat, :bam, [:bap, [:bah]]]
4497-
* h.flatten(3) # => [:foo, {:bar=>1, :baz=>2}, :bat, :bam, :bap, [:bah]]
4498-
* h.flatten(4) # => [:foo, {:bar=>1, :baz=>2}, :bat, :bam, :bap, :bah]
4499-
* h.flatten(5) # => [:foo, {:bar=>1, :baz=>2}, :bat, :bam, :bap, :bah]
4495+
* h.flatten(1) # => [:foo, {bar: 1, baz: 2}, :bat, [:bam, [:bap, [:bah]]]]
4496+
* h.flatten(2) # => [:foo, {bar: 1, baz: 2}, :bat, :bam, [:bap, [:bah]]]
4497+
* h.flatten(3) # => [:foo, {bar: 1, baz: 2}, :bat, :bam, :bap, [:bah]]
4498+
* h.flatten(4) # => [:foo, {bar: 1, baz: 2}, :bat, :bam, :bap, :bah]
4499+
* h.flatten(5) # => [:foo, {bar: 1, baz: 2}, :bat, :bam, :bap, :bah]
45004500
*
45014501
* With negative integer +depth+,
45024502
* flattens all levels:
45034503
*
4504-
* h.flatten(-1) # => [:foo, {:bar=>1, :baz=>2}, :bat, :bam, :bap, :bah]
4504+
* h.flatten(-1) # => [:foo, {bar: 1, baz: 2}, :bat, :bam, :bap, :bah]
45054505
*
45064506
* With +depth+ zero,
45074507
* returns the equivalent of #to_a:
45084508
*
4509-
* h.flatten(0) # => [[:foo, {:bar=>1, :baz=>2}], [:bat, [:bam, [:bap, [:bah]]]]]
4509+
* h.flatten(0) # => [[:foo, {bar: 1, baz: 2}], [:bat, [:bam, [:bap, [:bah]]]]]
45104510
*
45114511
* Related: see {Methods for Converting}[rdoc-ref:Hash@Methods+for+Converting].
45124512
*/

0 commit comments

Comments
 (0)