mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
lib/prime.rb: remove unused methods
This change removes TrialDivision#cache, TrialDivision#primes, and TrialDivision#primes_so_far. TrialDivision class is undocumented officially, so this class is used only internally. Yugui san moved prime library from mathn to prime in 2008, and then she might forget to delete these methods. A patch from @shio-phys. https://github.com/ruby/prime/pull/4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dc4ab636c0
commit
103b5063f2
1 changed files with 0 additions and 7 deletions
|
@ -391,13 +391,6 @@ class Prime
|
|||
@ulticheck_next_squared = 121 # @primes[@ulticheck_index + 1] ** 2
|
||||
end
|
||||
|
||||
# Returns the cached prime numbers.
|
||||
def cache
|
||||
@primes
|
||||
end
|
||||
alias primes cache
|
||||
alias primes_so_far cache
|
||||
|
||||
# Returns the +index+th prime number.
|
||||
#
|
||||
# +index+ is a 0-based index.
|
||||
|
|
Loading…
Reference in a new issue