mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
InitVM_Enumerator
* enumerator.c (InitVM_Enumerator): split from Init_Enumerator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8cdfe403d3
commit
8f30190dfe
1 changed files with 8 additions and 2 deletions
10
enumerator.c
10
enumerator.c
|
@ -1457,7 +1457,7 @@ stop_result(VALUE self)
|
|||
}
|
||||
|
||||
void
|
||||
Init_Enumerator(void)
|
||||
InitVM_Enumerator(void)
|
||||
{
|
||||
rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -1);
|
||||
rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -1);
|
||||
|
@ -1515,6 +1515,12 @@ Init_Enumerator(void)
|
|||
rb_define_method(rb_cYielder, "yield", yielder_yield, -2);
|
||||
rb_define_method(rb_cYielder, "<<", yielder_yield_push, -2);
|
||||
|
||||
rb_provide("enumerator.so"); /* for backward compatibility */
|
||||
}
|
||||
|
||||
void
|
||||
Init_Enumerator(void)
|
||||
{
|
||||
id_rewind = rb_intern("rewind");
|
||||
id_each = rb_intern("each");
|
||||
id_call = rb_intern("call");
|
||||
|
@ -1526,5 +1532,5 @@ Init_Enumerator(void)
|
|||
id_lazy = rb_intern("lazy");
|
||||
sym_each = ID2SYM(id_each);
|
||||
|
||||
rb_provide("enumerator.so"); /* for backward compatibility */
|
||||
InitVM(Enumerator);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue