mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/prime.rb (EratosthenesGenerator#initialize): call super.
(TrialDivisionGenerator, Generator23): ditto. [ruby-core:25539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
63b231cea0
commit
a8998030fb
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Sep 13 09:38:06 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/prime.rb (EratosthenesGenerator#initialize): call super.
|
||||||
|
(TrialDivisionGenerator, Generator23): ditto. [ruby-core:25539]
|
||||||
|
|
||||||
Sun Sep 13 09:34:10 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Sep 13 09:34:10 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* vm_method.c (rb_add_method_def): no warning for inherited
|
* vm_method.c (rb_add_method_def): no warning for inherited
|
||||||
|
|
|
@ -290,6 +290,7 @@ class Prime
|
||||||
class EratosthenesGenerator < PseudoPrimeGenerator
|
class EratosthenesGenerator < PseudoPrimeGenerator
|
||||||
def initialize
|
def initialize
|
||||||
@last_prime = nil
|
@last_prime = nil
|
||||||
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def succ
|
def succ
|
||||||
|
@ -306,6 +307,7 @@ class Prime
|
||||||
class TrialDivisionGenerator<PseudoPrimeGenerator
|
class TrialDivisionGenerator<PseudoPrimeGenerator
|
||||||
def initialize
|
def initialize
|
||||||
@index = -1
|
@index = -1
|
||||||
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def succ
|
def succ
|
||||||
|
@ -327,6 +329,7 @@ class Prime
|
||||||
def initialize
|
def initialize
|
||||||
@prime = 1
|
@prime = 1
|
||||||
@step = nil
|
@step = nil
|
||||||
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def succ
|
def succ
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue