diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-23 07:47:54 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-23 07:47:54 +0000 |
commit | efa115e451f3c5f0b354a6a961041614430578f8 (patch) | |
tree | da5f11233f3f05682ad7f24003eb41de241f8bfa | |
parent | 4baf5c4da61994e634ae66cdac25db1d2f1dcd8e (diff) |
* enumerator.c (Init_Enumerator): Override
Enumerable::Enumerator#each_with_index with #with_index.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | enumerator.c | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Fri May 23 16:44:34 2008 Akinori MUSHA <knu@iDaemons.org> + + * enumerator.c (Init_Enumerator): Override + Enumerable::Enumerator#each_with_index with #with_index. + Fri May 23 12:23:05 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * vm_core.h (rb_num_t): moved form vm.h. diff --git a/enumerator.c b/enumerator.c index cd35f54c58..6602e2c176 100644 --- a/enumerator.c +++ b/enumerator.c @@ -438,6 +438,7 @@ Init_Enumerator(void) rb_define_method(rb_cEnumerator, "initialize", enumerator_initialize, -1); rb_define_method(rb_cEnumerator, "initialize_copy", enumerator_init_copy, 1); 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, "next", enumerator_next, 0); rb_define_method(rb_cEnumerator, "rewind", enumerator_rewind, 0); |