From 103b5063f2568b1c16c1e5e2d234f783da7f73ff Mon Sep 17 00:00:00 2001 From: mame Date: Sun, 24 Jun 2018 09:31:07 +0000 Subject: [PATCH] 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 --- lib/prime.rb | 7 ------- 1 file changed, 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.