summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-24 09:31:07 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-24 09:31:07 +0000
commit103b5063f2568b1c16c1e5e2d234f783da7f73ff (patch)
tree0f052727303768e54abeca5446092e03fef0509e
parentdc4ab636c00182230e71ae9f6d36d5d7ec740402 (diff)
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
-rw-r--r--lib/prime.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/prime.rb b/lib/prime.rb
index 4fcbff678f..9f6db448be 100644
--- a/lib/prime.rb
+++ b/lib/prime.rb
@@ -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.