diff --git a/ChangeLog b/ChangeLog index 70f6c6ddac..b0d1133d95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri May 23 16:44:34 2008 Akinori MUSHA + + * enumerator.c (Init_Enumerator): Override + Enumerable::Enumerator#each_with_index with #with_index. + Fri May 23 12:23:05 2008 Nobuyoshi Nakada * 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);