Skip to content

Commit

Permalink
Fix doc Set#each returs nil instead of self (#10477)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick authored Mar 9, 2021
1 parent 67e2829 commit b02581f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/set.cr
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ struct Set(T)
@hash.empty?
end

# Yields each element of the set, and returns `self`.
def each
# Yields each element of the set, and returns `nil`.
def each : Nil
@hash.each_key do |key|
yield key
end
Expand Down

0 comments on commit b02581f

Please sign in to comment.