mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* enumerator.c (enumerator_initialize): Remove an undocumented
feature (passing a block to the constructor) that's broken. This is not what I intended. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a8321159c9
commit
185e2676af
2 changed files with 7 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Apr 22 19:35:03 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* sprintf.c (rb_f_sprintf): should protect temporary string from
|
||||
|
|
10
enumerator.c
10
enumerator.c
|
@ -51,7 +51,6 @@ enumerator_mark(p)
|
|||
{
|
||||
struct enumerator *ptr = p;
|
||||
rb_gc_mark(ptr->obj);
|
||||
rb_gc_mark(ptr->proc);
|
||||
rb_gc_mark(ptr->args);
|
||||
}
|
||||
|
||||
|
@ -258,13 +257,7 @@ enumerator_init(enum_obj, obj, meth, argc, argv)
|
|||
|
||||
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 @@ enumerator_init_copy(obj, orig)
|
|||
|
||||
ptr1->obj = ptr0->obj;
|
||||
ptr1->meth = ptr0->meth;
|
||||
ptr1->proc = ptr0->proc;
|
||||
ptr1->iter = ptr0->iter;
|
||||
ptr1->args = ptr0->args;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue