Skip to content

Commit

Permalink
Improve docs for Prime.include? (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
stomar committed Dec 25, 2019
1 parent 55dda6a commit 230a5af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/prime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def each(ubound = nil, generator = EratosthenesGenerator.new, &block)
generator.each(&block)
end

# Return true if +obj+ is an Integer an is prime. Also returns
# Returns true if +obj+ is an Integer and is prime. Also returns
# true if +obj+ is a Module that is an ancestor of +Prime+.
# Otherwise returns false.
def include?(obj)
case obj
when Integer
Expand Down

0 comments on commit 230a5af

Please sign in to comment.