diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-01 15:48:16 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-01 15:48:16 +0000 |
| commit | 534a419203385413da8a886cade681ec67414c57 (patch) | |
| tree | 958aa2ce4d50bc29fd6f080fc9aa6aeff0bf1f5f | |
| parent | cb467517ee2ca5fa8a1f2df761fd5b02c8a50adc (diff) | |
merges r24884 from trunk into ruby_1_9_1.
--
* lib/prime.rb (EratosthenesGenerator#initialize): call super.
(TrialDivisionGenerator, Generator23): ditto. [ruby-core:25539]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/prime.rb | 7 | ||||
| -rw-r--r-- | version.h | 2 |
3 files changed, 11 insertions, 3 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 08:30:30 2009 Masaki Suketa <masaki.suketa@nifty.ne.jp> * ext/win32ole/win32ole.c: fix WIN32OLE_TYPELIB.new when the 1st diff --git a/lib/prime.rb b/lib/prime.rb index c8c9265571..8846b14174 100644 --- a/lib/prime.rb +++ b/lib/prime.rb @@ -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 @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.1" -#define RUBY_PATCHLEVEL 328 +#define RUBY_PATCHLEVEL 329 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |
