ruby-changes:4653
From: ko1@a...
Date: Tue, 22 Apr 2008 19:39:33 +0900 (JST)
Subject: [ruby-changes:4653] knu - Ruby:r16147 (ruby_1_8): * enumerator.c (enumerator_initialize): Remove an undocumented
knu 2008-04-22 19:39:19 +0900 (Tue, 22 Apr 2008)
New Revision: 16147
Modified files:
branches/ruby_1_8/ChangeLog
branches/ruby_1_8/enumerator.c
Log:
* enumerator.c (enumerator_initialize): Remove an undocumented
feature (passing a block to the constructor) that's broken.
This is not what I intended.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=16147&r2=16146&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/enumerator.c?r1=16147&r2=16146&diff_format=u
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog (revision 16146)
+++ ruby_1_8/ChangeLog (revision 16147)
@@ -1,3 +1,9 @@
+Tue Apr 22 19:35:03 2008 Akinori MUSHA <knu@i...>
+
+ * enumerator.c (enumerator_initialize): Remove an undocumented
+ feature (passing a block to the constructor) that's broken.
+ This is not what I intended.
+
Tue Apr 22 17:49:46 2008 Yukihiro Matsumoto <matz@r...>
* sprintf.c (rb_f_sprintf): should protect temporary string from
Index: ruby_1_8/enumerator.c
===================================================================
--- ruby_1_8/enumerator.c (revision 16146)
+++ ruby_1_8/enumerator.c (revision 16147)
@@ -51,7 +51,6 @@
{
struct enumerator *ptr = p;
rb_gc_mark(ptr->obj);
- rb_gc_mark(ptr->proc);
rb_gc_mark(ptr->args);
}
@@ -258,13 +257,7 @@
ptr->obj = obj;
ptr->meth = rb_to_id(meth);
- if (rb_block_given_p()) {
- ptr->proc = rb_block_proc();
- ptr->iter = enumerator_iter_i;
- }
- else {
- ptr->iter = enumerator_each_i;
- }
+ ptr->iter = enumerator_each_i;
if (argc) ptr->args = rb_ary_new4(argc, argv);
return enum_obj;
@@ -316,7 +309,6 @@
ptr1->obj = ptr0->obj;
ptr1->meth = ptr0->meth;
- ptr1->proc = ptr0->proc;
ptr1->iter = ptr0->iter;
ptr1->args = ptr0->args;
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/