зеркало из https://github.com/github/ruby.git
[ruby/prime] Improve docs for Prime.include? (#7)
https://github.com/ruby/prime/commit/230a5af325
This commit is contained in:
Родитель
e79fc05a4c
Коммит
f236f6082c
|
@ -141,8 +141,9 @@ class Prime
|
|||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче