ruby-changes:7085
From: knu <ko1@a...>
Date: Thu, 14 Aug 2008 12:45:09 +0900 (JST)
Subject: [ruby-changes:7085] Ruby:r18602 (ruby_1_8): * enumerator.c (Init_Enumerator): Define ::Enumerator as alias for
knu 2008-08-14 12:44:49 +0900 (Thu, 14 Aug 2008) New Revision: 18602 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18602 Log: * enumerator.c (Init_Enumerator): Define ::Enumerator as alias for Enumerable::Enumerator for forward compatibility. * lib/rinda/tuplespace.rb (Rinda::TupleBag#initialize): Use enum_for instead of hardcoding Enumerable::Enumerator. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/enumerator.c branches/ruby_1_8/lib/rinda/tuplespace.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 18601) +++ ruby_1_8/ChangeLog (revision 18602) @@ -1,3 +1,11 @@ +Thu Aug 14 12:43:09 2008 Akinori MUSHA <knu@i...> + + * enumerator.c (Init_Enumerator): Define ::Enumerator as alias for + Enumerable::Enumerator for forward compatibility. + + * lib/rinda/tuplespace.rb (Rinda::TupleBag#initialize): Use + enum_for instead of hardcoding Enumerable::Enumerator. + Wed Aug 13 18:18:16 2008 Akinori MUSHA <knu@i...> * hash.c (rb_hash_set_default_proc): Add Hash#default_proc=; Index: ruby_1_8/enumerator.c =================================================================== --- ruby_1_8/enumerator.c (revision 18601) +++ ruby_1_8/enumerator.c (revision 18602) @@ -432,6 +432,7 @@ rb_cEnumerator = rb_define_class_under(rb_mEnumerable, "Enumerator", rb_cObject); rb_include_module(rb_cEnumerator, rb_mEnumerable); + rb_define_global_const("Enumerator", rb_cEnumerator); rb_define_alloc_func(rb_cEnumerator, enumerator_allocate); rb_define_method(rb_cEnumerator, "initialize", enumerator_initialize, -1); Index: ruby_1_8/lib/rinda/tuplespace.rb =================================================================== --- ruby_1_8/lib/rinda/tuplespace.rb (revision 18601) +++ ruby_1_8/lib/rinda/tuplespace.rb (revision 18602) @@ -315,7 +315,7 @@ def initialize # :nodoc: @hash = {} - @enum = Enumerable::Enumerator.new(self, :each_entry) + @enum = enum_for(:each_entry) end ## -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/