* enumerator.c (Init_Enumerator): Rename Enumerable::Enumerator to
just Enumerator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5f5b25d234
commit
7b8e762afa
@ -1,3 +1,8 @@
|
|||||||
|
Wed Aug 13 15:25:09 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* enumerator.c (Init_Enumerator): Rename Enumerable::Enumerator to
|
||||||
|
just Enumerator.
|
||||||
|
|
||||||
Wed Aug 13 15:13:57 2008 Akinori MUSHA <knu@iDaemons.org>
|
Wed Aug 13 15:13:57 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* common.mk (prelude.c, golf_prelude.c): Using $(COMPILE_PRELUDE)
|
* common.mk (prelude.c, golf_prelude.c): Using $(COMPILE_PRELUDE)
|
||||||
|
14
enumerator.c
14
enumerator.c
@ -16,7 +16,7 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Document-class: Enumerable::Enumerator
|
* Document-class: Enumerator
|
||||||
*
|
*
|
||||||
* A class which provides a method `each' to be used as an Enumerable
|
* A class which provides a method `each' to be used as an Enumerable
|
||||||
* object.
|
* object.
|
||||||
@ -67,7 +67,7 @@ enumerator_ptr(VALUE obj)
|
|||||||
* obj.to_enum(method = :each, *args)
|
* obj.to_enum(method = :each, *args)
|
||||||
* obj.enum_for(method = :each, *args)
|
* obj.enum_for(method = :each, *args)
|
||||||
*
|
*
|
||||||
* Returns Enumerable::Enumerator.new(self, method, *args).
|
* Returns Enumerator.new(self, method, *args).
|
||||||
*
|
*
|
||||||
* e.g.:
|
* e.g.:
|
||||||
*
|
*
|
||||||
@ -241,11 +241,11 @@ enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* Enumerable::Enumerator.new(obj, method = :each, *args)
|
* Enumerator.new(obj, method = :each, *args)
|
||||||
*
|
*
|
||||||
* Creates a new Enumerable::Enumerator object, which is to be
|
* Creates a new Enumerator object, which is to be used as an
|
||||||
* used as an Enumerable object using the given object's given
|
* Enumerable object using the given object's given method with the
|
||||||
* method with the given arguments.
|
* given arguments.
|
||||||
*
|
*
|
||||||
* Use of this method is discouraged. Use Kernel#enum_for() instead.
|
* Use of this method is discouraged. Use Kernel#enum_for() instead.
|
||||||
*/
|
*/
|
||||||
@ -480,7 +480,7 @@ Init_Enumerator(void)
|
|||||||
rb_define_method(rb_mEnumerable, "each_slice", enum_each_slice, 1);
|
rb_define_method(rb_mEnumerable, "each_slice", enum_each_slice, 1);
|
||||||
rb_define_method(rb_mEnumerable, "each_cons", enum_each_cons, 1);
|
rb_define_method(rb_mEnumerable, "each_cons", enum_each_cons, 1);
|
||||||
|
|
||||||
rb_cEnumerator = rb_define_class_under(rb_mEnumerable, "Enumerator", rb_cObject);
|
rb_cEnumerator = rb_define_class("Enumerator", rb_cObject);
|
||||||
rb_include_module(rb_cEnumerator, rb_mEnumerable);
|
rb_include_module(rb_cEnumerator, rb_mEnumerable);
|
||||||
|
|
||||||
rb_define_alloc_func(rb_cEnumerator, enumerator_allocate);
|
rb_define_alloc_func(rb_cEnumerator, enumerator_allocate);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user