ruby-changes:5846
From: knu <ko1@a...>
Date: Mon, 16 Jun 2008 09:49:42 +0900 (JST)
Subject: [ruby-changes:5846] Ruby:r17353 (trunk): * enumerator.c (enumerator_with_object, Init_Enumerator):
knu 2008-06-16 09:49:25 +0900 (Mon, 16 Jun 2008) New Revision: 17353 Modified files: trunk/ChangeLog trunk/doc/NEWS trunk/enumerator.c Log: * enumerator.c (enumerator_with_object, Init_Enumerator): Temporarily back out with_memo, for which we need a better name. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17353&r2=17352&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enumerator.c?r1=17353&r2=17352&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/doc/NEWS?r1=17353&r2=17352&diff_format=u Index: doc/NEWS =================================================================== --- doc/NEWS (revision 17352) +++ doc/NEWS (revision 17353) @@ -107,7 +107,6 @@ * Enumerable and Enumerator o Enumerable#map,collect_all called without a block returns an enumerator. - o Enumerable::Enumerator#with_memo * Regexp#match, String#match o Regexp#match, String#match * Fiber: coroutines/micro-threads Index: ChangeLog =================================================================== --- ChangeLog (revision 17352) +++ ChangeLog (revision 17353) @@ -1,3 +1,8 @@ +Mon Jun 16 09:43:27 2008 Akinori MUSHA <knu@i...> + + * enumerator.c (enumerator_with_object, Init_Enumerator): + Temporarily back out with_memo, for which we need a better name. + Mon Jun 16 07:14:48 2008 Nobuyoshi Nakada <nobu@r...> * ext/stringio/stringio.c (strio_readline, strio_each) Index: enumerator.c =================================================================== --- enumerator.c (revision 17352) +++ enumerator.c (revision 17353) @@ -357,15 +357,15 @@ } static VALUE -enumerator_with_memo_i(VALUE val, VALUE memo) +enumerator_with_object_i(VALUE val, VALUE memo) { return rb_yield_values(2, val, memo); } /* * call-seq: - * e.with_memo(obj) {|(*args), memo_obj| ... } - * e.with_memo(obj) + * e.with_object(obj) {|(*args), memo_obj| ... } + * e.with_object(obj) * * Iterates the given block for each element with an arbitrary * object given, and returns the memo object. @@ -374,7 +374,7 @@ * */ static VALUE -enumerator_with_memo(VALUE obj, VALUE memo) +enumerator_with_object(VALUE obj, VALUE memo) { struct enumerator *e; int argc = 0; @@ -387,7 +387,7 @@ argv = RARRAY_PTR(e->args); } rb_block_call(e->obj, e->meth, argc, argv, - enumerator_with_memo_i, memo); + enumerator_with_object_i, memo); return memo; } @@ -489,7 +489,9 @@ rb_define_method(rb_cEnumerator, "each", enumerator_each, 0); rb_define_method(rb_cEnumerator, "each_with_index", enumerator_with_index, 0); rb_define_method(rb_cEnumerator, "with_index", enumerator_with_index, 0); - rb_define_method(rb_cEnumerator, "with_memo", enumerator_with_memo, 1); +#if 0 + rb_define_method(rb_cEnumerator, "with_object", enumerator_with_object, 1); +#endif rb_define_method(rb_cEnumerator, "next", enumerator_next, 0); rb_define_method(rb_cEnumerator, "rewind", enumerator_rewind, 0); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/