1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* enumerator.c (Init_Enumerator): use an internal directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-07-15 14:20:19 +00:00
parent 05d8e212b1
commit fd0f36a4a8
2 changed files with 4 additions and 5 deletions

View file

@ -1,3 +1,7 @@
Fri Jul 15 23:20:03 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enumerator.c (Init_Enumerator): use an internal directly.
Fri Jul 15 07:58:10 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* lib/webrick/server.rb (WEBrick::GenericServer#accept_client):

View file

@ -325,7 +325,6 @@ enumerator_initialize(argc, argv, obj)
VALUE *argv;
VALUE obj;
{
struct enumerator *ptr = enumerator_ptr(obj);
VALUE recv, meth = sym_each;
if (argc == 0)
@ -405,13 +404,9 @@ enumerator_with_index(obj)
void
Init_Enumerator()
{
VALUE rb_mEnumerable;
rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -2);
rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -2);
rb_mEnumerable = rb_path2class("Enumerable");
rb_define_method(rb_mEnumerable, "enum_with_index", enumerator_enum_with_index, 0);
rb_define_method(rb_mEnumerable, "each_slice", enum_each_slice, 1);
rb_define_method(rb_mEnumerable, "enum_slice", enumerator_enum_slice, 1);