1
0
Fork 0
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:
nobu 2009-09-13 00:38:07 +00:00
parent 63b231cea0
commit a8998030fb
2 changed files with 10 additions and 2 deletions

View file

@ -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>
* vm_method.c (rb_add_method_def): no warning for inherited

View file

@ -91,14 +91,14 @@ class Prime
warn "Prime::new is obsolete. use Prime::instance or class methods of Prime."
end
class<<self
class << self
extend Forwardable
include Enumerable
# Returns the default instance of Prime.
def instance; @the_instance end
def method_added(method) # :nodoc:
(class<<self;self;end).def_delegator :instance, method
(class<< self;self;end).def_delegator :instance, method
end
end
@ -290,6 +290,7 @@ class Prime
class EratosthenesGenerator < PseudoPrimeGenerator
def initialize
@last_prime = nil
super
end
def succ
@ -306,6 +307,7 @@ class Prime
class TrialDivisionGenerator<PseudoPrimeGenerator
def initialize
@index = -1
super
end
def succ
@ -327,6 +329,7 @@ class Prime
def initialize
@prime = 1
@step = nil
super
end
def succ