Age | Commit message (Collapse) | Author |
|
use assert_not instead of refute, unless required minitest
directly.
* test/test_prime.rb (TestPrime::sieve.Integer): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
not been displayed when $VERBOSE == nil. Patch by Shota Fukumori
a.k.a. sora_h. [ruby-dev:42272]
Recovers $stderr even if StringIO.new fails. Reported by unak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(TestPrime#test_eratosthenes_works_fine_after_timeout):
test for [ruby-dev:39465].
* lib/prime.rb (Prime::EratosthenesSieve):
fixed [ruby-dev:39465].
suppressed memory reallocation.
constantified some magic numbers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
negative integer into a decomposition with element [-1, 1].
* test/test_prime.rb: test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[ruby-core:22646].
* test/test_prime.rb (test_prime?): test case for [ruby-core:22646].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(Prime): ditto.
* lib/prime.rb (Integer): moved from mathn.rb.
(Integer.each_prime): added.
(Integer#prime?): added.
(Prime): moved from mathn.rb.
Its implmentation was rewritten. see [ruby-dev:35863].
And patched by Keiju ISHITSUKA <keiju@ishitsuka.com>,
see [ruby-dev:36128].
(Prime.new): obsolete.
(Prime.instance): added.
(Prime.each): added.
(Prime.int_from_prime_division): added.
(Prime.prime_division): added.
(Prime.prime?): added.
Patch by TOYOFUKU Chikanobu
<nobu_toyofuku at nifty.com> in [ruby-dev:36067].
(Prime.cache): removed.
(Prime.primes): removed.
(Prime.primes_so_far): removed.
(Prime#int_from_prime_division): added.
(Prime#prime_division): added.
(Prime#prime?): added.
(Prime#primes): removed.
(Prime#primes_so_far): removed.
(Prime::PseudoPrmeGenerator): added.
(Prime::EratosthenesGenerator): added.
(Prime::TrialDivisionGenerator): added.
(Prime::Generator23): added.
(Prime::TrialDivision): added.
Extracted from the previous implementation of Prime
by Keiju ISHITSUKA.
(Prime::EratosthenesSieve): added.
* lib/.document (prime.rb): added
* lib/README (prime.rb): added
* test/test_prime.rb: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|