[前][次][番号順一覧][スレッド一覧]

ruby-changes:51527

From: mame <ko1@a...>
Date: Sun, 24 Jun 2018 18:31:15 +0900 (JST)
Subject: [ruby-changes:51527] mame:r63737 (trunk): lib/prime.rb: remove unused methods

mame	2018-06-24 18:31:07 +0900 (Sun, 24 Jun 2018)

  New Revision: 63737

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63737

  Log:
    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

  Modified files:
    trunk/lib/prime.rb
Index: lib/prime.rb
===================================================================
--- lib/prime.rb	(revision 63736)
+++ lib/prime.rb	(revision 63737)
@@ -391,13 +391,6 @@ class Prime https://github.com/ruby/ruby/blob/trunk/lib/prime.rb#L391
       @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.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]