mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* insns.def (concatarray, splatarray): use to_a instead of
to_splat. * insnhelper.ci (caller_setup_args): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6fafbfd63e
commit
2bbffcd6a4
8 changed files with 14 additions and 48 deletions
14
enumerator.c
14
enumerator.c
|
@ -365,19 +365,6 @@ enumerator_with_index(VALUE obj)
|
|||
enumerator_with_index_i, (VALUE)&memo);
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* e.to_splat => array
|
||||
*
|
||||
* Convert this enumerator object to an array to splat.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
enumerator_to_splat(VALUE obj)
|
||||
{
|
||||
return rb_convert_type(obj, T_ARRAY, "Array", "to_a");
|
||||
}
|
||||
|
||||
static VALUE
|
||||
next_ii(VALUE i, VALUE obj)
|
||||
{
|
||||
|
@ -475,7 +462,6 @@ Init_Enumerator(void)
|
|||
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, "with_index", enumerator_with_index, 0);
|
||||
rb_define_method(rb_cEnumerator, "to_splat", enumerator_to_splat, 0);
|
||||
rb_define_method(rb_cEnumerator, "next", enumerator_next, 0);
|
||||
rb_define_method(rb_cEnumerator, "rewind", enumerator_rewind, 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue